RaGEZONE sponsored advertisment:
| | The free 3D side scrolling MMORPG. | |
12-28-2008
|
#1 (permalink)
| | Life > Maple***gotry
Rank: Member + Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts
| [Release] Russian Roulette NPC
EDIT: Sorry for the errors in this one, i will be releasing this after im 100% done with it, it will have over 50 outcomes ranging from Balrogs spawning to winning a jackpot to having NX slimes spawn http://www.youtube.com/watch?v=ZS5S1PKb6k8&fmt=18
First you need to add this crap into NPCConversationManager.java PHP Code: public void setMP(int MP) { getPlayer().setMP(MP); getPlayer().updateSingleStat(MapleStat.MP, Integer.valueOf(MP)); } public void setHP(int hp) { getPlayer().sethp(hp); getPlayer().updateSingleStat(MapleStat.HP, Integer.valueOf(hp)); }
Then add this to MapleCharacter... PHP Code: public void setMP(int MP) { this.mp = mp-1; }
public void sethp(int hp) { this.hp = hp-1; }
PHP Code: /* Base Script by Luke(Roamer in RaGEZONE) Shit done by RaptorJesus, go ahead and claim it as your own cause i made this in like 3 mins while chatting to Supi, Airflow, Steve and my other faggots on IRC. */
importPackage(net.sf.odinms.client);
var status = 0; var fee; var chance = Math.floor(Math.random()*6+1);
function start() { status = -1; action(1, 0, 0); }
function action(mode, type, selection) { if (mode == -1) { cm.dispose(); } else { if (mode == 0) { cm.sendOk("Later suckka...."); cm.dispose(); return; } if (mode == 1) status++; else status--; if (status == 0) { cm.sendNext("Hey man, lets play some #bRussian Roulette#k If you win, you can keep your mesos, but if you loose...Well...Thats it...Oh, also the fee to play is 5k mesos..."); } else if (status == 1) { cm.sendGetText("How many mesos would you like to bet?"); } else if (status == 2) { fee = cm.getText(); cm.sendYesNo("Are you sure you want to bet #r" + fee + "#k Mesos?... "); } else if (status == 3) { if (cm.getMeso() < fee) { cm.sendOk("You Amount of mesos you Gamble cannot exceed the current amount of mesos in your inventory idiot!! "); cm.dispose(); } else if (cm.getText() < 0) { cm.sendOk("You can't gamble less than 0 Mesos..."); cm.dispose(); } else { if (chance <= 1) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance == 2) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance == 3) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance == 4) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance == 5) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance >= 6) { cm.gainMeso(fee * 2); cm.gainMeso(-5000); cm.sendNext("You pass the gun back to the man, he hands you your cash and you walk away..."); cm.dispose(); } } } } }
Last edited by RaptorJesus; 12-28-2008 at 09:49 PM.
|
| |
RaGEZONE sponsored advertisment:
12-28-2008
|
#2 (permalink)
| | wtfe
Rank: Subscriber Join Date: Apr 2008
Posts: 964
Thanked 147 Times in 70 Posts
| Re: [Release] Russian Roulette NPC
Nice release.
lol.
|
| | 
Endorsement
12-28-2008
|
#3 (permalink)
| | Life > Maple***gotry
Rank: Member + Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts
| Re: [Release] Russian Roulette NPC
|
Originally Posted by Traitor | |
lol.
| shhh, let them figure it all out.
|
| | 
Endorsement
12-28-2008
|
#4 (permalink)
| | Alpha
Rank: Member
Join Date: Dec 2008 Location: USA
Posts: 148
Thanked 1 Time in 1 Post
| Re: [Release] Russian Roulette NPC
Rather than add those to NPC conversation manager, you could simply use
cm.getChar().setMp(cm.getChar().getMp() - amount) and vice versa for HP.
I believe that's the right one, but bleh, I don't usually do NPC work with HP or MP.
lol o.o
|
| |
12-28-2008
|
#5 (permalink)
| | Λκαяυz føяeνeя
Rank: Moderator Join Date: Jun 2008 Location: Philadelphia, U
Posts: 3,499
Thanked 81 Times in 13 Posts
| Re: [Release] Russian Roulette NPC
nice release
Thanks for giving credits without even me bothering to ask.
__________________ SteamID: elitegg_roamer ---- MSN: aista@live.com ---- AIM: hardcoreplox |
| |
12-28-2008
|
#6 (permalink)
| | Life > Maple***gotry
Rank: Member + Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts
| Re: [Release] Russian Roulette NPC
|
Originally Posted by Roamer |
nice release
Thanks for giving credits without even me bothering to ask.
| No problemo?
Also, you should come join our IRC lulz fest on Valhalla's irc
|
| |
12-28-2008
|
#7 (permalink)
| | Getting into Graphics
Rank: Member + Join Date: Jun 2008 Location: Somewhere =D
Posts: 646
Thanked 1 Time in 1 Post
| Re: [Release] Russian Roulette NPC
Umm..
1/5 chance, all you can win back is 5,000 mesos.
When you win, you gain doule your mesos then you loose 5k. ^_^
|
| |
12-28-2008
|
#8 (permalink)
| | Life > Maple***gotry
Rank: Member + Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts
| Re: [Release] Russian Roulette NPC
|
Originally Posted by Mages4ever |
Umm..
1/5 chance, all you can win back is 5,000 mesos.
When you win, you gain doule your mesos then you loose 5k. ^_^
| No no mah boy
You enter the mesos you want to bet, lets say 1 million mesos, if you win you get 2 million mesos -5k mesos.
|
| |
12-28-2008
|
#9 (permalink)
| | Λκαяυz føяeνeя
Rank: Moderator Join Date: Jun 2008 Location: Philadelphia, U
Posts: 3,499
Thanked 81 Times in 13 Posts
| Re: [Release] Russian Roulette NPC
|
Originally Posted by Mages4ever |
Umm..
1/5 chance, all you can win back is 5,000 mesos.
When you win, you gain doule your mesos then you loose 5k. ^_^
| You can always edit the script x_x
__________________ SteamID: elitegg_roamer ---- MSN: aista@live.com ---- AIM: hardcoreplox |
| |
12-28-2008
|
#10 (permalink)
| | Eccm.tk
Rank: Member + Join Date: Oct 2008 Location: Eccm.tk
Posts: 778
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
EDIT: Nvm
|
| |
12-28-2008
|
#11 (permalink)
| | Infraction Banned
Rank: Member + Join Date: Dec 2008 Location: In a tree
Posts: 765
Thanked 8 Times in 2 Posts
| Re: [Release] Russian Roulette NPC PHP Code: if (chance >= 6) { cm.gainMeso(fee * 2); cm.gainMeso(-5000); cm.sendNext("You pass the gun back to the man, he hands you your cash and you walk away..."); cm.dispose(); } else { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); }
Why not use this instead of copying over and over
|
| |
12-28-2008
|
#12 (permalink)
| | Rest In Peace, Igor
Rank: Alpha Member Join Date: Aug 2008 Location: Wherever you ar
Posts: 2,675
Thanked 4 Times in 4 Posts
| Re: [Release] Russian Roulette NPC
|
Originally Posted by MrMysterious | PHP Code: if (chance >= 6) {
cm.gainMeso(fee * 2);
cm.gainMeso(-5000);
cm.sendNext("You pass the gun back to the man, he hands you your cash and you walk away...");
cm.dispose();
} else {
cm.gainMeso(-fee);
cm.gainMeso(-5000);
cm.setHP(0);
cm.setMP(0);
cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that...");
cm.dispose();
}
Why not use this instead of copying over and over
| Because sometimes, people forget.
Anyway, nice release :D
|
| |
12-28-2008
|
#13 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Sep 2008
Posts: 60
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
Hmm this is very much the same as the gambling npc,is just that the content not the same.
Anyway nice release
__________________ AutumnMS FTW!!  |
| |
12-28-2008
|
#14 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Dec 2008
Posts: 18
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
Lol nice release xD
@dragonsin53 nice siggy LOL.
Though you could make it much smaller. No need to redo all the chances ;) PHP Code: if (chance >= 1 && chance <=5) { cm.gainMeso(-fee); cm.gainMeso(-5000); cm.setHP(0); cm.setMP(0); cm.sendNext("Well it looks like you shot yourself in the temple...Good luck with that..."); cm.dispose(); } else if (chance >= 6) { cm.gainMeso(fee * 2); cm.gainMeso(-5000); cm.sendNext("You pass the gun back to the man, he hands you your cash and you walk away..."); cm.dispose(); }
EDIT: Oops it's up here :D I didn't read that post. Anyway this is a good way
|
| |
12-28-2008
|
#15 (permalink)
| | I Don't Own A Server
Rank: Member + Join Date: May 2008 Location: Singapore
Posts: 469
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
this reminds me of roulette npcs in Ragnarok online p servers lolol.
|
| |
12-28-2008
|
#16 (permalink)
| | The Omega
Rank: Member
Join Date: Oct 2008
Posts: 104
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
wht version work this?
|
| |
12-28-2008
|
#17 (permalink)
| | I Don't Own A Server
Rank: Member + Join Date: May 2008 Location: Singapore
Posts: 469
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
should work in 55 onwards
|
| |
12-28-2008
|
#18 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Dec 2008
Posts: 2
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
GOOD!I like you |
| |
12-28-2008
|
#19 (permalink)
| | Infraction Banned
Rank: Member + Join Date: Dec 2008 Location: In a tree
Posts: 765
Thanked 8 Times in 2 Posts
| Re: [Release] Russian Roulette NPC PHP Code: } else if (cm.getText() < 0) {
change that to PHP Code: } else if (fee < 0) {
|
| |
12-29-2008
|
#21 (permalink)
| | [ Sizz'em Out ]
Rank: Member + Join Date: Jul 2008 Location: Singapore
Posts: 1,278
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
Nice release :D
|
| |
09-28-2009
|
#22 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Mar 2009
Posts: 21
Thanked 0 Times in 0 Posts
| Re: [Release] Russian Roulette NPC
nice release
|
| |
11-19-2009
|
#23 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Nov 2009 Location: Malaysia
Posts: 18
Thanked 1 Time in 1 Post
| Re: [Release] Russian Roulette NPC
Nice Release~^^
|
| |
LinkBacks (?)
LinkBack to this Thread: http://forum.ragezone.com/f427/release-russian-roulette-npc-517435/ | | Posted By | For | Type | Date | | maplestory libary | This thread | Refback | 07-20-2009 07:14 AM | |