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] Jail Npc

Newbie Spellweaver
Joined
Jul 29, 2008
Messages
89
Reaction score
6
Code:
/* The Jail Npc
   Edited/Made By: Alex1333a789  cause i was bored and had nothing else to do
*/


var status = 0;

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendYesNo("Free items?");
		} else if (status == 1) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 2) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 3) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 4) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 5) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 6) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 7) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 8) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 9) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 10) {
			cm.sendYesNo("Free Eye Of Fire?");	
			cm.gainItem(4001017,10);
		} else if (status == 11) {
			cm.sendYesNo("Want to go out of jail?");	
		} else if (status == 12) {
			cm.warp(922020000, 0);
			}
	    }
}
This is a jail npc. Put this in your jail and see if people click it.
If your jail is forgotten darkness then :| too bad for you.
Errm? Have fun (woot 2nd release i'ma release more npc even though i know some are crapy :D probly like this one lol i don't care some ppl may use it)
and and you can use it to send people to jail ^.^
 
Junior Spellweaver
Joined
Jul 21, 2008
Messages
124
Reaction score
47
That's a good trick if somebody doesn't know what's going to happen and they spam Yes xD
 
Junior Spellweaver
Joined
Apr 2, 2008
Messages
197
Reaction score
0
Lol oh wow. People who are going to click are going to complain.
 
Junior Spellweaver
Joined
Feb 3, 2008
Messages
183
Reaction score
2
Lol , try changing the "sendYesNo" to "sendOk"

And after they Won ALLLLLLLLLLLLL Those items add a gainItem(itemid, -heregoesthequantityxD) Should be funny ^^
 
Newbie Spellweaver
Joined
Jul 29, 2008
Messages
89
Reaction score
6
Alright
- Added to library

Really omfg :D Ty (that was my first npc :D)
and
''Lol , try changing the "sendYesNo" to "sendOk"

And after they Won ALLLLLLLLLLLLL Those items add a gainItem(itemid, -heregoesthequantityxD) Should be funny ^^ ''
oh yea so true but i gtg sleep now D: lol i'll go make another random npc tommorow
 
Newbie Spellweaver
Joined
Jul 29, 2008
Messages
89
Reaction score
6
Code:
/* The Jail Npc
   Edited/Made By: Alex1333a789  cause i was bored and had nothing else to do
*/


var status = 0;

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendYesNo("Free items?");
		} else if (status == 1) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 2) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 3) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 4) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 5) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 6) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 7) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 8) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 9) {
			cm.sendYesNo("Free items?");	
			cm.gainItem(2022179,1);
		} else if (status == 10) {
			cm.sendYesNo("Free Eye Of Fire?");	
			cm.gainItem(4001017,10);
		} else if (status == 11) {
			cm.sendYesNo("Want to go out of jail?");	
		} else if (status == 12) {
			cm.warp(922020000, 0);
			cm.gainItem(4001017,-10);
			cm.gainItem(2022179,-10);
			cm.dispose()
			}
	    }
}
Version two i coded this right on the spot but it still should work i'ma go test it right now...
 
Last edited:
Newbie Spellweaver
Joined
Jul 29, 2008
Messages
89
Reaction score
6
Tested 2nd code and it worked
Edit: Releaseing another npc today ^.^
 
Newbie Spellweaver
Joined
Jul 29, 2008
Messages
89
Reaction score
6
o_O you really don't need cm.dispose it ends the convo with a npc when there is no more code to go on make it say or do anything else
 
Master Summoner
Loyal Member
Joined
Jul 27, 2008
Messages
583
Reaction score
0
o_O you really don't need cm.dispose it ends the convo with a npc when there is no more code to go on make it say or do anything else

lol, yes it does..
but it's because it have nothing else to says, but the NPC remainds open.. so you can't talk to any NPC, till you CC or re-log.
 
Junior Spellweaver
Joined
Feb 3, 2008
Messages
183
Reaction score
2
lol, yes it does..
but it's because it have nothing else to says, but the NPC remainds open.. so you can't talk to any NPC, till you CC or re-log.

Finally , some drama :D I (L) Drama XP...

Dude , just add a cm.dispose() at the end xD
 
Back
Top