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!

[Release] GMS Shanks

Experienced Elementalist
Joined
Apr 2, 2007
Messages
260
Reaction score
1
In MapleIsland.cpp

Add anywhere:

Code:
void NPCsScripts::npc_22000(NPC* npc){
    int state = npc->getState();
    if(state == 0){
        npc->addText("Take this ship and you'll head off to a bigger continent.#e For 150 mesos#n, I'll take you to #bVictoria Island#k");
        npc->addText(". The thing is, once you leave this place, you can't ever come back. What do you think? Do you want to go to Victoria Island?");
        npc->sendYesNo();
    }
    else if(state == 1){
        if(npc->getSelected() == YES){
            npc->addText("Bored of this place? Here... Give me 150 mesos first...");
            npc->sendNext();
        }
        else{
            npc->addText("Hmm... I guess you still have things to do here?");
            npc->sendOK();
        }
    }
    else if(state == 2){
        if(npc->getSelected() == YES){
            if(npc->getLevel() > 6){
                if(npc->getMesos() > 149){
                    npc->giveMesos(-150);
                    npc->addText("Awesome! #e150 mesos#n accepted! Alright, off to Victoria Island!");
                    npc->sendNext();
                }
                else{
                    npc->addText("What? You're telling me you wanted to go without any money? You're one weirdo...");
                    npc->setSelected(NO);
                    npc->sendOK();
                }
            }
            else{
                npc->addText("Let's see... I don't think you are strong enough. You'll have to be at least #bLevel 7#k ");
                npc->addText("to go to Victoria Island.");
                npc->setSelected(NO);
                npc->sendOK();
            }
        }
        else{
            npc->end();
        }
    }
    else if(state == 3){
        if(npc->getSelected() == YES){
            npc->teleport(104000000);
        }
        npc->end();
    }
}

Add:
Code:
char NPC::getLevel(){
    return player->getLevel();
}

Above:
Code:
void NPC::setStyle(int id){
    if(id/10000 == 0){
        player->setSkin((char)id);
    }
    else if(id/10000 == 2){
        player->setEyes(id);
    }
    else if(id/10000 == 3){
        player->setHair(id);
    }
    InventoryPacket::updatePlayer(player);
}

In NPCs.h

Add:
Code:
char getLevel();

Below:
Code:
void giveEXP(int exp);

In NPCsScripts.h

Add where it belongs:
Code:
case 22000: npc_22000(npc); break;

Code:
static void npc_22000(NPC* npc);

Text is taken from the official GMS Shanks NPC on Maple Island.
Credits: Firon, xSLaYaHx for the bolded text.
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
294
Reaction score
0
wow a realistic Shank, thank you very much man ;)

may you could do Phil to ?
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
157
Reaction score
0
lmao a shanks that doesnt say hey fucker gtfo my island and stuff lmao
 
Experienced Elementalist
Joined
Apr 2, 2007
Messages
260
Reaction score
1
Code:
int type;

// Lith Harbor - Phil
void NPCsScripts::npc_1002000(NPC* npc){
	int state = npc->getState();
	if(state == 0){
		npc->addText("Hey, there. My name is Phil!\r\nI run the ticket booth here in #bLith Harbor#k. If you want to go to another town, then talk to me! I'll gladly take you to your destination!");
		npc->sendNext();
	}
	if(state == 1){
		npc->addText("Do you wanna head over to some other town?\r\n#L0#Henesys#l\r\n#L1#Kerning City#l\r\n#L2#Perion#l\r\n#L3#Ellinia#l");
		npc->sendSimple();
	}
	if(state == 2){
		type = npc->getSelected();
		npc->setVariable("type", type);
		if(type == 0){ // Heneseys
			npc->addText("You don’t have anything else to do here, huh? Do you really want to go to #bHeneseys#k?");
			npc->sendYesNo();
		}
		else if(type == 1){ // Kerning
			npc->addText("You don’t have anything else to do here, huh? Do you really want to go to #bKerning City#k?");
			npc->sendYesNo();			
		}
		else if(type == 2){ // Perion
			npc->addText("You don’t have anything else to do here, huh? Do you really want to go to #bPerion#k?");
			npc->sendYesNo();
		}
		else if(type == 3){ // Ellinia
			npc->addText("You don’t have anything else to do here, huh? Do you really want to go to #bEllinia#k?");
			npc->sendYesNo();
		}
	}
	if(state == 3 && type == 0){
		if(npc->getSelected() == YES){
			npc->giveMesos(-800);
			npc->end();
			npc->teleport(100000000);
		}
		else{
			npc->addText("There’s a lot to see in this town, too. Come back and find me when you need to go to a different town.");
			npc->sendOK();
		}
		npc->end();
	}
	if(state == 3 && type == 1){
		if(npc->getSelected() == YES){
			npc->giveMesos(-1000);
			npc->teleport(103000000);
		}
		else{
			npc->addText("There’s a lot to see in this town, too. Come back and find me when you need to go to a different town.");
			npc->sendOK();
		}
		npc->end();
	}
	if(state == 3 && type == 2){
		if(npc->getSelected() == YES){
			npc->giveMesos(-1200);
			npc->teleport(102000000);
		}
		else{
			npc->addText("There’s a lot to see in this town, too. Come back and find me when you need to go to a different town.");
			npc->sendOK();
		}
		npc->end();
	}
	if(state == 3 && type == 3){
		if(npc->getSelected() == YES){
			npc->giveMesos(-1000);
			npc->teleport(101000000);
		}
		else{
			npc->addText("There’s a lot to see in this town, too. Come back and find me when you need to go to a different town.");
			npc->sendOK();
		}
		npc->end();
	}
}

There's Phil; just not sure about the prices. I'll add in the beginner discount later.
 
Experienced Elementalist
Joined
Apr 2, 2007
Messages
260
Reaction score
1
I'm going to work on finishing the Victoria Island NPCs, take a break, and start working on the Ossy. NPCs after that.
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
294
Reaction score
0
Slayah you seem to understand about coding NPCs, can you pass by my thread and read my last post?
 
Master Summoner
Joined
Apr 2, 2008
Messages
538
Reaction score
0
May you explain where the hell this is?
Code:
void NPC::setStyle(int id){
    if(id/10000 == 0){
        player->setSkin((char)id);
    }
    else if(id/10000 == 2){
        player->setEyes(id);
    }
    else if(id/10000 == 3){
        player->setHair(id);
    }
    InventoryPacket::updatePlayer(player);
}
 
Newbie Spellweaver
Joined
Aug 16, 2007
Messages
91
Reaction score
0
Read closely above post,

Add:
Code:
char NPC::getLevel(){
    return player->getLevel();
}
Above:
Code:
void NPC::setStyle(int id){
    if(id/10000 == 0){
        player->setSkin((char)id);
    }
    else if(id/10000 == 2){
        player->setEyes(id);
    }
    else if(id/10000 == 3){
        player->setHair(id);
    }
    InventoryPacket::updatePlayer(player);
}
In NPCs.h
 
Newbie Spellweaver
Joined
Nov 23, 2007
Messages
7
Reaction score
0
xSLaYaHx - [Release] GMS Shanks - RaGEZONE Forums

Why dont you go find me the file?
 
Junior Spellweaver
Joined
Jul 30, 2005
Messages
100
Reaction score
4
Why dont you go find me the file?
Since you ask it in a 'better', however sarcastic way than kiddy, I'll tell you :]

I have to admit that I was wrong about it aswel, I read the file too fast and only read the 'NPCs' part, however, if you search in the entire solution, you'll see that it's in NPCs.cpp, sorry for that xD
 
Newbie Spellweaver
Joined
Nov 23, 2007
Messages
7
Reaction score
0
Im actually the one that brought this up to xnblaze. He's helping me a little with making a server etc. So, yeah thanks :]
 
Junior Spellweaver
Joined
Jul 30, 2005
Messages
100
Reaction score
4
Im actually the one that brought this up to xnblaze. He's helping me a little with making a server etc. So, yeah thanks :]
Well you see, I love to help people, as long as it's being asked in a normal and social way..

This:

Code:
May you explain where the hell this is?

Followed by:

Code:
Thats for the below code. Like seriously, stop trying to correct me with your retarded butt, you dont even look on your own.

Simply doesn't do the trick.

It wasn't quite hard to see that iarehenry was simply trying to help. Sure his answer was wrong, but so was mine in the first place. No need to call people names for making mistakes.. But who am I to care?
 
Newbie Spellweaver
Joined
May 25, 2007
Messages
17
Reaction score
0
stupid question--> where do I put Phil's script?
 
Newbie Spellweaver
Joined
Apr 10, 2008
Messages
46
Reaction score
0
the char NPC::getLevel(){
return player->getLevel();
}
has to be added in npcs.cpp
 
Back
Top