Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Ria in GM map spawns 10 Golden slimes for 1 mil.

Status
Not open for further replies.
Junior Spellweaver
Joined
Jan 14, 2008
Messages
113
Reaction score
0
Hello maybe u know it already but my name is vincent and i'm bored again xD
For this to work you need to Add my "spawnMob" feature :
Code:
http://forum.ragezone.com/showthread.php?t=398364

1.
paste this in to a new .cpp file
Code:
#include "NPCs.h"
#include "Player.h"
#include "NPCsScripts.h"
#include "Inventory.h"

void NPCsScripts::npc_9010003(NPC* npc){
    Player* player = npc->getPlayer();
    int state = npc->getState();

    if(state == 0){
        npc->addText("Hello, I can spawn Golden Slimes for 1 milion mesos. Do you want me to spawn Golden Slimes?");
        state = 1;
        npc->sendYesNo();
    }
    else if(state == 1){
        if(npc->getMesos() >= 1000000){
            if(npc->getSelected() == YES){
                npc->addText("Okay, Poopiedoo.");
                npc->giveMesos(-1000000);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->spawnMob(9400202);
                npc->sendOK();
                npc->end();
            }
            else if(npc->getSelected() == NO){
                npc->addText("Fine, I won't spawn!");
                npc->sendOK();
                npc->end();
            }
        }
        else if(npc->getMesos() <=1000000){
            if(npc->getSelected() == YES){
                npc->addText("You don't have enough mesos.");
                npc->sendOK();
                npc->end();
            }
        }
    }
}

if u wanna let her spawn for less money just change :
Code:
("Hello, I can spawn Golden Slimes for [COLOR=DarkOrange]1 milion[/COLOR] mesos. Do you want me to spawn Golden Slimes?");
,
Code:
else if(state == 1){
        if(npc->getMesos() >= [COLOR=DarkOrange]1000000[/COLOR]){
            if(npc->getSelected() == YES){
                npc->addText("Okay, Poopiedoo.");
                npc->giveMesos(-[COLOR=DarkOrange]1000000[/COLOR]);
                npc->spawnMob(9400202);
and
Code:
 }
        else if(npc->getMesos() <=[COLOR=DarkOrange]1000000[/COLOR]){
            if(npc->getSelected() == YES){
                npc->addText("You don't have enough mesos.");
                npc->sendOK();
                npc->end();
to your price =D

2.
In NPCsScripts.h add:
Code:
case 9010003: npc_9010003(npc); break;
sumwhere between the other case things.

and add:
Code:
static void npc_9010003(NPC* npc);
to static void things.

3.
add this to the 180000000.xml file(can be found in /ur repack/maplestoryserver/maps/180000000.xml):
Code:
        <NPC>
            <id>9010003</id>
            <x>300</x>
            <cy>95</cy>
            <fh>23</fh>
            <rx0>300</rx0>
            <rx1>300</rx1>
        </NPC>
so ur 180000000.xml file looks something like this(can be an npc more or less):
Code:
<?xml version="1.0" ?>
<Map>
    <returnMap>100000000</returnMap>
    <NPCs>
        <NPC>
            <id>9900000</id>
            <x>374</x>
            <cy>95</cy>
            <fh>23</fh>
            <rx0>324</rx0>
            <rx1>379</rx1>
        </NPC>
[COLOR=DarkOrange]         <NPC>
            <id>9010003</id>
            <x>300</x>
            <cy>95</cy>
            <fh>23</fh>
            <rx0>300</rx0>
            <rx1>300</rx1>
        </NPC>[/COLOR]
        <NPC>
            <id>9900001</id>
            <x>283</x>
            <cy>-85</cy>
            <fh>26</fh>
            <rx0>233</rx0>
            <rx1>289</rx1>
        </NPC>
    <NPC>
        <id>9201052</id>
        <x>150</x>
        <cy>-82</cy>
        <fh>28</fh>
        <rx0>200</rx0>
        <rx1>200</rx1>
    </NPC>
    </NPCs>
    <Mobs />
    <Portals>
        <Portal>
            <id>0</id>
            <from>sp</from>
            <to></to>
            <toid>999999999</toid>
            <type>0</type>
            <x>0</x>
            <y>0</y>
        </Portal>
    </Portals>
    <Footholds>
        <Foothold>
            <x1>-270</x1>
            <y1>-205</y1>
            <x2>-180</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>-399</x1>
            <y1>-180</y1>
            <x2>-399</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>-399</x1>
            <y1>-205</y1>
            <x2>-321</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>-321</x1>
            <y1>-205</y1>
            <x2>-270</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>270</x1>
            <y1>-205</y1>
            <x2>321</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>-180</x1>
            <y1>-205</y1>
            <x2>-90</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>-90</x1>
            <y1>-205</y1>
            <x2>0</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>0</x1>
            <y1>-205</y1>
            <x2>90</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>90</x1>
            <y1>-205</y1>
            <x2>180</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>180</x1>
            <y1>-205</y1>
            <x2>270</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>321</x1>
            <y1>-205</y1>
            <x2>360</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>360</x1>
            <y1>-205</y1>
            <x2>399</x2>
            <y2>-205</y2>
        </Foothold>
        <Foothold>
            <x1>399</x1>
            <y1>-205</y1>
            <x2>399</x2>
            <y2>-180</y2>
        </Foothold>
        <Foothold>
            <x1>-399</x1>
            <y1>120</y1>
            <x2>-399</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>-399</x1>
            <y1>95</y1>
            <x2>-321</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>-321</x1>
            <y1>95</y1>
            <x2>-270</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>-270</x1>
            <y1>95</y1>
            <x2>-180</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>-180</x1>
            <y1>95</y1>
            <x2>-90</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>0</x1>
            <y1>95</y1>
            <x2>90</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>-90</x1>
            <y1>95</y1>
            <x2>0</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>90</x1>
            <y1>95</y1>
            <x2>180</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>180</x1>
            <y1>95</y1>
            <x2>270</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>321</x1>
            <y1>95</y1>
            <x2>399</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>399</x1>
            <y1>95</y1>
            <x2>399</x2>
            <y2>120</y2>
        </Foothold>
        <Foothold>
            <x1>270</x1>
            <y1>95</y1>
            <x2>321</x2>
            <y2>95</y2>
        </Foothold>
        <Foothold>
            <x1>231</x1>
            <y1>-85</y1>
            <x2>309</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>309</x1>
            <y1>-85</y1>
            <x2>309</x2>
            <y2>-60</y2>
        </Foothold>
        <Foothold>
            <x1>180</x1>
            <y1>-85</y1>
            <x2>231</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>90</x1>
            <y1>-85</y1>
            <x2>180</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>0</x1>
            <y1>-85</y1>
            <x2>90</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>-90</x1>
            <y1>-85</y1>
            <x2>0</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>-219</x1>
            <y1>-60</y1>
            <x2>-219</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>-219</x1>
            <y1>-85</y1>
            <x2>-141</x2>
            <y2>-85</y2>
        </Foothold>
        <Foothold>
            <x1>-141</x1>
            <y1>-85</y1>
            <x2>-90</x2>
            <y2>-85</y2>
        </Foothold>
    </Footholds>
</Map>

Credits:
Me, for starting with npc coding and release.
mudkip, for fixing some bugs in npc code.
Asianboy, for the idea
 
Newbie Spellweaver
Joined
Apr 29, 2008
Messages
59
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

Nice job Ill test this and this would work for v.54 right?
 
Newbie Spellweaver
Joined
Apr 16, 2008
Messages
11
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

For this to work you need to Add my "spawnMob" feature :
Code:
[URL="http://forum.ragezone.com/showthread.php?t=398364"]http://forum.ragezone.com/showthread.php?t=398364[/URL]
 
Experienced Elementalist
Joined
Apr 18, 2008
Messages
286
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

Hey give credit for me for idea.... I ask you to make for me... and no credit....

Edit thanks! Also nice job making it work!
 
Junior Spellweaver
Joined
Jan 14, 2008
Messages
113
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

should i make more options of monsters to spawn?
 
Newbie Spellweaver
Joined
May 5, 2008
Messages
79
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

Nice, Vino104 nice idea
 
Newbie Spellweaver
Joined
Apr 26, 2008
Messages
17
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

when i press spam its dc me why?
 
Junior Spellweaver
Joined
Jan 14, 2008
Messages
113
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

For this to work you need to Add my "spawnMob" feature :
Code:
[URL]http://forum.ragezone.com/showthread.php?t=398364[/URL]

are you sure u did that?
 
Junior Spellweaver
Joined
Jan 14, 2008
Messages
113
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

vino104 said:
this would give u the choice of goldenslime and silverslime could you please test it ???

Code:
#include "NPCs.h"

#include "Player.h"

#include "NPCsScripts.h"

#include "Inventory.h"

void NPCsScripts::npc_9010003(NPC* npc){

    Player* player = npc->getPlayer();

    int state = npc->getState();

    if(state == 0){

        npc->addText("Hello, I can spawn different monsters for 1 milion mesos. Do you want me to spawn a monster?");

        npc->addText("what monster do you want me to spawn?#l\r\n#L0##bGolden Slimes#k 1000000 Mesos#l\r\n#L1##bSilver Slimes#k 1000000 

Mesos

        state = 1;

        npc->sendSimple();

    }

    else if(state == 1){

    if(type == 0){

            if(npc->getMesos() >= 1000000){

                npc->addText("Okay, Poopiedoo.");

                npc->giveMesos(-1000000);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->spawnMob(9400202);

                npc->sendOK();

                npc->end();

              }

 }

}

        else if(npc->getMesos() <=1000000){

                npc->addText("You don't have enough mesos.");

                npc->sendOK();

                npc->end();

            }

    else if(state == 1){

    if(type == 1){

            if(npc->getMesos() >= 1000000){

                npc->addText("Okay, Poopiedoo.");

                npc->giveMesos(-1000000);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->spawnMob(9400203);

                npc->sendOK();

                npc->end();

              }

 }

}

        else if(npc->getMesos() <=1000000){

                npc->addText("You don't have enough mesos.");

                npc->sendOK();

                npc->end();

            }
could somebody please test this??
 
Newbie Spellweaver
Joined
Apr 20, 2008
Messages
10
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

how can you like make a new file?
you have to link it somehow :| im a noob and i dont know how :|
can anyone help?
----------------
Edit: i just placed it in TeleportNPCs.cpp
and it worked. but i still want to know how i can creat new files and link them :S
 
Experienced Elementalist
Joined
Apr 18, 2008
Messages
286
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

could somebody please test this??

I can ill tell you results after

how can you like make a new file?
you have to link it somehow :| im a noob and i dont know how :|
can anyone help?
----------------
Edit: i just placed it in TeleportNPCs.cpp
and it worked. but i still want to know how i can creat new files and link them :S

When making a new cpp or h, to link just put #include " " and it should link
 
Newbie Spellweaver
Joined
Apr 26, 2008
Messages
52
Reaction score
0
Re: [Release] Ria in GM map spawns 10 Golden slimes for 1 mil.

NPCs.obj : error LNK2001: unresolved external symbol "private: static void __cdecl NPCsScripts::npc_9010003(class NPC *)" (?npc_9010003@NPCsScripts@@CAXPAVNPC@@@Z)
H:\Programs\MapleStoryServer\Release\MapleStoryServer.exe : fatal error LNK1120: 1 unresolved externals
 
Status
Not open for further replies.
Back
Top