You are Unregistered, please register to gain Full access.
    


RaGEZONE sponsored advertisment:

Dragonica Image
The free 3D side scrolling MMORPG.

 
 
LinkBack (1) Thread Tools
Old 12-28-2008   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Life > Maple***gotry
 
RaptorJesus's Avatar
 
Rank: Member +
Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts

[Release] Russian Roulette NPC

Your Ad Here
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.MPInteger.valueOf(MP));
}
public 
void setHP(int hp) {
getPlayer().sethp(hp);
getPlayer().updateSingleStat(MapleStat.HPInteger.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(100);
}

function 
action(modetypeselection) {
    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.
RaptorJesus is offline  

RaGEZONE sponsored advertisment:
Old 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.
Traitor is offline  

Endorsement
Old 12-28-2008   #3 (permalink)
Life > Maple***gotry
 
RaptorJesus's Avatar
 
Rank: Member +
Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts

Re: [Release] Russian Roulette NPC

Originally Posted by Traitor View Post
lol.
shhh, let them figure it all out.
__________________




RaptorJesus is offline  

Endorsement

Old 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
__________________
og.Lios is offline  
Old 12-28-2008   #5 (permalink)
Λκαяυz føяeνeя
 
Roamer's Avatar
 
Rank: Moderator
Join Date: Jun 2008
Location: Philadelphia, U
Posts: 3,499
Blog Entries: 11
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
Roamer is offline  
Old 12-28-2008   #6 (permalink)
Life > Maple***gotry
 
RaptorJesus's Avatar
 
Rank: Member +
Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts

Re: [Release] Russian Roulette NPC

Originally Posted by Roamer View Post
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
__________________




RaptorJesus is offline  
Old 12-28-2008   #7 (permalink)
Getting into Graphics
 
Mages4ever's Avatar
 
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. ^_^
Mages4ever is offline  
Old 12-28-2008   #8 (permalink)
Life > Maple***gotry
 
RaptorJesus's Avatar
 
Rank: Member +
Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts

Re: [Release] Russian Roulette NPC

Originally Posted by Mages4ever View Post
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.
__________________




RaptorJesus is offline  
Old 12-28-2008   #9 (permalink)
Λκαяυz føяeνeя
 
Roamer's Avatar
 
Rank: Moderator
Join Date: Jun 2008
Location: Philadelphia, U
Posts: 3,499
Blog Entries: 11
Thanked 81 Times in 13 Posts

Re: [Release] Russian Roulette NPC

Originally Posted by Mages4ever View Post
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
Roamer is offline  
Old 12-28-2008   #10 (permalink)
Eccm.tk
 
BloodAngel13's Avatar
 
Rank: Member +
Join Date: Oct 2008
Location: Eccm.tk
Posts: 778
Thanked 0 Times in 0 Posts

Re: [Release] Russian Roulette NPC

EDIT: Nvm
BloodAngel13 is offline  
Old 12-28-2008   #11 (permalink)
Infraction Banned
 
MrMysterious's Avatar
 
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
MrMysterious is offline  
Old 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 View Post
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
HydroBenZ is offline  
Old 12-28-2008   #13 (permalink)
Average Member
 
dragonsin53's Avatar
 
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!!

dragonsin53 is offline  
Old 12-28-2008   #14 (permalink)
Newbie
 
Rank: Hobbit
Join Date: Dec 2008
Posts: 18
Thanked 0 Times in 0 Posts

Thumbs up 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 >= && 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
xxInternalxx is offline  
Old 12-28-2008   #15 (permalink)
I Don't Own A Server
 
thegamer1907's Avatar
 
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.
thegamer1907 is offline  
Old 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?
gio01 is offline  
Old 12-28-2008   #17 (permalink)
I Don't Own A Server
 
thegamer1907's Avatar
 
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
thegamer1907 is offline  
Old 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
2497035 is offline  
Old 12-28-2008   #19 (permalink)
Infraction Banned
 
MrMysterious's Avatar
 
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) { 
MrMysterious is offline  
Old 12-28-2008   #20 (permalink)
Life > Maple***gotry
 
RaptorJesus's Avatar
 
Rank: Member +
Join Date: Apr 2008
Posts: 1,319
Thanked 138 Times in 52 Posts

Re: [Release] Russian Roulette NPC

Sorry for the errors in this one, here is a video of what im working on releasein'
http://www.youtube.com/watch?v=ZS5S1PKb6k8&fmt=18
__________________




RaptorJesus is offline  
Old 12-29-2008   #21 (permalink)
[ Sizz'em Out ]
 
xbLazE's Avatar
 
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
__________________
xbLazE is offline  
Old 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
joelohss is offline  
Old 11-19-2009   #23 (permalink)
Newbie
 
prokiller's Avatar
 
Rank: Hobbit
Join Date: Nov 2009
Location: Malaysia
Posts: 18
Thanked 1 Time in 1 Post

Re: [Release] Russian Roulette NPC

Nice Release~^^
prokiller is offline  
 

Bookmarks

Thread Tools


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



Translated by Google
Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Maltese Norwegian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Taiwanese Thai Turkish Ukrainian Vietnamese
no new posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274