[release]Mr. Moneybags

Results 1 to 12 of 12
  1. #1
    Valued Member chaosbayer is offline
    MemberRank
    Sep 2007 Join Date
    138Posts

    [release]Mr. Moneybags

    Open your maplestoryserver project file, right click gameserver file and new file. Name it moneybags.cpp or something and insert this in it

    /* This file was made by ChaosBayer[main developer of ragestory]
    And can be edited to your needs with the right permission.
    */
    #include"NPCs.h"
    #include"NPCsScripts.h"
    #include"Player.h"
    void NPCsScripts::moneybags(NPC* npc) {
    Player* player = npc->getPlayer();
    int state = npc->getState();
    if (state == 0) {
    npc->addText(
    "Hello! I'm Mr. Moneybags. Would you like to use a Red Envelope and try to win up to 5,000,000 mesos?");
    npc->sendYesNo();
    }
    elseif (state == 1) {
    if(npc->getSelected() == YES){
    if(player->inv->getItemAmount(4031249) >= 1) {
    npc->giveItem(4031249, -1);
    int random = (rand()% 5) + 1;
    if(random == 1){
    npc->giveMesos(5000)
    }
    if(random == 2){
    npc->giveMesos(5000)
    }
    if(random == 3){
    npc->giveMesos(50000)
    }
    if(random == 4){
    npc->giveMesos(500000)
    }
    if(random == 5){
    npc->giveMesos(5000000)
    }
    }
    else{
    npc->addText(
    "I'm sorry, you don't have a #bRed Envelope#k.")
    npc->sendOK();
    }
    }
    }
    }

    and in npcscripts.h add

    case 9300010: moneybags(npc); break;

    staticvoid moneybags(NPC* npc);

    i'll add the mysql query for gmsdb soon.


  2. #2
    for(alive>0){makeMoney()} xphire is offline
    MemberRank
    Aug 2006 Join Date
    Usa, NYLocation
    1,257Posts

    Re: [release]Mr. Moneybags

    You should make it that you are only allowed to use him once. Like att a state that after you use it, he says "You already used a red envelope" i can code that easily, but you should add that so noobs dont spam him all day.

  3. #3
    Proficient Member llammaboi is offline
    MemberRank
    Apr 2008 Join Date
    My Home.Location
    194Posts

    Re: [release]Mr. Moneybags

    Just moderate how many Red Envelopes are around. No need to make it a one-time-use.

  4. #4
    Alpha Member Gmanpopinjay is offline
    MemberRank
    Dec 2007 Join Date
    1,588Posts

    Re: [release]Mr. Moneybags

    Quote Originally Posted by llammaboi View Post
    Just moderate how many Red Envelopes are around. No need to make it a one-time-use.
    i like ur sig =P o and nice release ^^

  5. #5
    Member TheXvieT is offline
    MemberRank
    Oct 2007 Join Date
    Surrey,BCLocation
    99Posts

    Re: [release]Mr. Moneybags

    umm dose it work for titan repacks?
    and nice work

  6. #6
    Member FeelsGood is offline
    MemberRank
    Apr 2008 Join Date
    91Posts

    Re: [release]Mr. Moneybags

    which repack u talking about?

  7. #7
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: [release]Mr. Moneybags

    Nice.
    There are some errors, So I fixed the script :

    #include"NPCs.h"
    #include"NPCsScripts.h"
    #include"Player.h"

    // Mr MoneyBags ~
    void NPCsScripts::npc_9300010(NPC* npc){
    Player* player = npc->getPlayer();
    int state = npc->getState();
    if (state == 0) {
    npc->addText("Hello! I'm Mr. Moneybags. Would you like to use a Red Envelope and try to win up to 5,000,000 mesos?"); // NPC Text
    npc->sendYesNo();
    }
    else if (state == 1) {
    if(npc->getSelected() == YES){
    if(player->inv->getItemAmount(4031249) >= 1) {
    npc->giveItem(4031249, -1);
    int random = (rand()% 5) + 1; // Rates to get the mesos 1-5
    if(random == 1){
    npc->giveMesos(5000);
    }
    if(random == 2){
    npc->giveMesos(5000);
    }
    if(random == 3){
    npc->giveMesos(50000);
    }
    if(random == 4){
    npc->giveMesos(500000);
    }
    if(random == 5){
    npc->giveMesos(5000000);
    }
    }else{
    npc->addText("I'm sorry, you don't have a #bRed Envelope#k.");
    npc->sendOK();
    }
    }
    }
    }
    At npcsscripts.h
    add :

    static void npc_9300010(NPC* npc);
    case 9300010: npc_9300010(npc); break;

    have fun.

  8. #8
    Novice limsiaokia is offline
    MemberRank
    May 2008 Join Date
    1Posts

    Re: [release]Mr. Moneybags

    still got error lar
    >NPCs.obj : error LNK2019: unresolved external symbol "private: static void __cdecl NPCsScripts::npc_9300010(class NPC *)" (?npc_9300010@NPCsScripts@@CAXPAVNPC@@@Z) referenced in function "public: static void __cdecl NPCsScripts::handle(int,class NPC *)" (?handle@NPCsScripts@@SAXHPAVNPC@@@Z)
    1>C:\Documents and Settings\Xcrossis\Desktop\MapleStoryServer\Debug\MapleStoryServer.exe : fatal error LNK1120: 1 unresolved externals
    1>Build log was saved at "file://c:\Documents and Settings\Xcrossis\Desktop\MapleStoryServer\MapleStoryServer\Debug\BuildLog.htm"
    1>MapleStoryServer - 2 error(s), 0 warning(s)

  9. #9
    8===D Hubba is offline
    MemberRank
    Jan 2009 Join Date
    CanadaLocation
    1,009Posts

    Re: [release]Mr. Moneybags

    good release i might fix and add some stuff and than pm you

  10. #10
    Account Upgraded | Title Enabled! maplepuppet is offline
    MemberRank
    Nov 2008 Join Date
    New JerseyLocation
    905Posts

    Re: [release]Mr. Moneybags

    Quote Originally Posted by Hubba View Post
    good release i might fix and add some stuff and than pm you
    Ughhhhhhhhhhhhhhhhhhhhh

  11. #11
    Λκαяυz føяeνeя Roamer is offline
    MemberRank
    Jun 2008 Join Date
    215Location
    3,203Posts

    Re: [release]Mr. Moneybags

    Quote Originally Posted by maplepuppet View Post
    Ughhhhhhhhhhhhhhhhhhhhh
    Spammer.
    Did he bump an old thread? OH NO!?
    Report the thread; and leave.
    No need to continue posting shitless spam

  12. #12
    Interesting... SharpAceX is online now
    MemberRank
    Oct 2008 Join Date
    2,011Posts

    Re: [release]Mr. Moneybags

    Use code tags plox.



Advertisement