Jump to content
  • 0

Event NPC


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

can i request this npc for example:

i'll bet for 100k z, then i will get random zennies and items like, 4 elunium, 4 oridecon, 250k z, 500k, and the jackpot prize is 1 million zeny.

then the npc will announce if the player gets the jackpot prize.. thank you.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  01/25/12
  • Last Seen:  

prontera,156,180,4 script Event NPC 100,{
mes "Would you like to play ? ";
next;
if(select("Yes:No") == 2)
close;
if(Zeny < 100000) {
mes "Your zeny is not enough";
close;
}
set Zeny, Zeny-100000;
next;
mes "....";
next;
set .@rand, rand(1,100);
if(.@rand < 2 ) { // Jackpot Prize 1% win
mes "Congratulations you won the jackpot!!!";
set Zeny, Zeny+1000000;
}
else if(.@rand < 5) { Other Prize 5% win
mes "Congratulations you won consolation prize!!";
switch(rand(4)) {
 case 0: getitem 985,4; break;
 case 1: getitem 984,4; break;
 case 2: set Zeny,Zeny+250000; break;
 case 3: set Zeny,Zeny+500000; break;
}
}
else {
mes "Too bad you didn't win anything!!";
}
close;
}

Edited by deathscythe13
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

@deathscythe13 thanks! btw.. how can i change the rate of the jackpot prize?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

set .@rand, rand(1,100);
if(.@rand < 2 ) { // Jackpot Prize 1% win

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

ok it fixed.. but i want to make the prize like this:

60% = 2 Ori and 2 Elu

40% = 5 Ori and 5 Elu

30% = 100k z,

25% = 200k z

15% = 300k z

5% = 1m z

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

Then you'll have to edit this part of the Script :

if(.@rand < 2 ) { // Jackpot Prize 1% win
mes "Congratulations you won the jackpot!!!";
set Zeny, Zeny+1000000;
}
else if(.@rand < 5) { Other Prize 5% win
mes "Congratulations you won consolation prize!!";
switch(rand(4)) {
 case 0: getitem 985,4; break;
 case 1: getitem 984,4; break;
 case 2: set Zeny,Zeny+250000; break;
 case 3: set Zeny,Zeny+500000; break;
}
}
else {
mes "Too bad you didn't win anything!!";
}
close;
}

to this part:

if(.@rand < 61) {
if(.@rand < 41) {
if(.@rand < 31) {
if(.@rand < 26) {
if(.@rand < 16) {
if(.@rand < 6) {
mes "Congratulations you won the Jackpot!!";
set Zeny, Zeny+1000000;
close;
}
mes "Congratulations you won consolation prize!!";
set Zeny, Zeny+300000;
close;
}
mes "Congratulations you won consolation prize!!";
set Zeny, Zeny+200000;
close;
}

mes "Congratulations you won consolation prize!!";
set Zeny, Zeny+100000;
close;
}

mes "Congratulations you won consolation prize!!";
getitem 984,5;
getitem 985,5;
close;
}

mes "Congratulations you won consolation prize!!";
getitem 984,2;
getitem 985,2;
close;
} else {
mes "Too bad,you didn't win anything!!";
close;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...