Jump to content
  • 0

Cluckers error! help.. (Pvp ladder cause it error i think)


donkeyg

Question


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

Cluckers error! help.. (Pvp ladder cause it error i think) , my players click the cluckers non-stop for almost 10 minutes, still didnt give out reward... and some of them got error.. what happened?

post-2303-0-60037200-1358336288_thumb.jpg

here my script

//===== Athena Script =====================================
//= Cluck! Cluck! Boom!
//===== By Keale of VoidRO ================================
//= http://voidro.com
//===== Description =======================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
//= stun, or make you fall asleep.
//= The prize is configurable and triggered by the NPC.
//===== Credits ===========================================
//= LuTze for his 'Chicken of Punishment' script.
//= BrianL for suggesting the 'switch' command.
//===== Version ===========================================
//= v1.1
//=========================================================
//= v1.0 - First release.
//= v1.1 - Using 'switch rand' instead.
//=========================================================

izlude,111,115,3 script Cluckrr 800,{

if ($@startcluck == 1) goto L_playcluck;

cluckcluck:
if (getgmlevel() >= 1) goto cluckadmin;
mes "[Cluckers]";
mes "Cluck cluck! Cluuuuuck?";
mes "Cluck....";
close;

cluckadmin:
mes "[Cluckers]";
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
case 1:
next;
mes "[Cluckers]";
mes "CLUCK! ^FF0000~Sure thing!~^000000";
emotion 33;
close2;
goto L_cluckannounce;
case 2:
next;
mes "[Cluckers]";
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
next;
goto cluckadmin;
case 3:
next;
mes "[Cluckers]";
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $cluck_item_id;
next;
mes "[Cluckers]";
mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
input $cluck_item_amount;
next;
mes "[Cluckers]";
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
emotion 33;
next;
goto cluckadmin;
case 4:
next;
mes "[Cluckers]";
mes "Cluck cluck cluck...";
close;
}

L_cluckannounce:
announce "[Cluck! Cluck! Boom!] is about to start in Event Area!",bc_blue;
initnpctimer;
end;
OnTimer10000:
announce "Please proceed to the Event Area if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
end;
OnTimer30000:
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
set $@startcluck,1;
end;

L_playcluck:
specialeffect2 2;
switch( rand(15) ) {
case 0:
npctalk "CLUUUUUUCK!!!";
emotion 23;
atcommand "@nuke "+strcharinfo(0);
break;
case 1:
npctalk "Cluuuuuck!~";
break;
case 2:
atcommand "@nuke "+strcharinfo(0);
break;
case 3:
sc_start SC_Freeze,10000,0;
break;
case 4:
npctalk "CLUUUUUUUUUCK!!!";
emotion 23;
atcommand "@nuke "+strcharinfo(0);
break;
case 5:
sc_start SC_Sleep,10000,0;
break;
case 6:
emotion 29;
sc_start SC_Stone,10000,0;
break;
case 7:
npctalk "CLUUUUUUCK!!!";
emotion 23;
atcommand "@nuke "+strcharinfo(0);
break;
case 8:
npctalk "Cluck! CLUUUCK!!";
emotion 23;
atcommand "@nuke "+strcharinfo(0);
break;
case 9:
sc_start SC_Stun,10000,0;
break;
case 10:
emotion 29;
sc_start SC_Sleep,10000,0;
break;
case 11:
npctalk "Cluck! Cluck!";
break;
case 12:
sc_start SC_Stun,10000,0;
break;
case 13:
atcommand "@nuke "+strcharinfo(0);
break;
default:
if( rand(50) < 3 ) {
npctalk "WOOF!...........";
specialeffect2 72;
announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " Squeezed out the prize! Well done!",0;
getitem $cluck_item_id,$cluck_item_amount;
set $@startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
atcommand "@nuke "+strcharinfo(0);
}
break;
}
}

Edited by AnnieRuru
use [codebox] if the script > 10 lines
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   2
  • Joined:  10/09/12
  • Last Seen:  

Try this script sir, this version 1.2a maybe some bug has been fixed. Btw the reward chance really low, u nid to keep trying


//===== rAthena Script =======================================
//= Cluck! Cluck! Boom!
//===== By: ==================================================
//= Keale
//===== Current Version: =====================================
//= 1.2a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
//= stun, or make you fall asleep.
//= The prize is configurable and triggered by the NPC.
//===== Additional Comments: =================================
//= 1.0 First release.
//= 1.1 Using 'switch rand' instead.
//= 1.2 Cleaned and standardized. [Euphy]
//= 1.2a Switched 'atcommand' to 'unitskilluseid'.
//============================================================

prontera,156,219,4 script Cluckers 800,{

set .@GMAccess,80; // GM level required to access NPC

if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
case 3: sc_start SC_Freeze,10000,0; break;
case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 5: sc_start SC_Sleep,10000,0; break;
case 6: sc_start SC_Stone,10000,0; emotion 29; break;
case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 9: sc_start SC_Stun,10000,0; break;
case 10: sc_start SC_Sleep,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_Stun,10000,0; break;
case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
specialeffect2 72;
announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
getitem $cluck_item_id,$cluck_item_amount;
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
}
break;
}
end;
}
mes "[Cluckers]";
if (getgmlevel() >= .@GMAccess) {
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
next;
while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
case 1:
mes "[Cluckers]";
mes "CLUCK! ^FF0000~Sure thing!~^000000";
emotion 33;
close2;
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
initnpctimer;
end;
case 2:
mes "[Cluckers]";
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
next;
break;
case 3:
mes "[Cluckers]";
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $cluck_item_id;
next;
mes "[Cluckers]";
mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
input $cluck_item_amount;
next;
mes "[Cluckers]";
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
emotion 33;
next;
break;
case 4:
mes "[Cluckers]";
mes "Cluck cluck cluck...";
close;
}
}
mes "Cluck cluck! Cluuuuuck?";
mes "Cluck....";
close;

OnTimer10000:
announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
end;
OnTimer30000:
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
if (!$cluck_item_id) set $cluck_item_id,512;
if (!$cluck_item_amount) set $cluck_item_amount,1;
set .startcluck,1;
end;
}

P/S: Please use codebox for long script

Edited by Fai T.Flowright
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

The chance in your script is very low, you can calculate the odd.

1st part: 1/14 = 7.14% even after you succeed on 1st part, you'll have to pass through the 2nd one.

2nd part: 3/49 = 6.12%.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

Try this script sir, this version 1.2a maybe some bug has been fixed. Btw the reward chance really low, u nid to keep trying


//===== rAthena Script =======================================
//= Cluck! Cluck! Boom!
//===== By: ==================================================
//= Keale
//===== Current Version: =====================================
//= 1.2a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
//= stun, or make you fall asleep.
//= The prize is configurable and triggered by the NPC.
//===== Additional Comments: =================================
//= 1.0 First release.
//= 1.1 Using 'switch rand' instead.
//= 1.2 Cleaned and standardized. [Euphy]
//= 1.2a Switched 'atcommand' to 'unitskilluseid'.
//============================================================

prontera,156,219,4 script Cluckers 800,{

set .@GMAccess,80; // GM level required to access NPC

if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
case 3: sc_start SC_Freeze,10000,0; break;
case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 5: sc_start SC_Sleep,10000,0; break;
case 6: sc_start SC_Stone,10000,0; emotion 29; break;
case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 9: sc_start SC_Stun,10000,0; break;
case 10: sc_start SC_Sleep,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_Stun,10000,0; break;
case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
specialeffect2 72;
announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
getitem $cluck_item_id,$cluck_item_amount;
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
}
break;
}
end;
}
mes "[Cluckers]";
if (getgmlevel() >= .@GMAccess) {
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
next;
while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
case 1:
mes "[Cluckers]";
mes "CLUCK! ^FF0000~Sure thing!~^000000";
emotion 33;
close2;
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
initnpctimer;
end;
case 2:
mes "[Cluckers]";
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
next;
break;
case 3:
mes "[Cluckers]";
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $cluck_item_id;
next;
mes "[Cluckers]";
mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
input $cluck_item_amount;
next;
mes "[Cluckers]";
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
emotion 33;
next;
break;
case 4:
mes "[Cluckers]";
mes "Cluck cluck cluck...";
close;
}
}
mes "Cluck cluck! Cluuuuuck?";
mes "Cluck....";
close;

OnTimer10000:
announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
end;
OnTimer30000:
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
if (!$cluck_item_id) set $cluck_item_id,512;
if (!$cluck_item_amount) set $cluck_item_amount,1;
set .startcluck,1;
end;
}

P/S: Please use codebox for long script

Ok sorry.. but this didnt happened before, but don know why it suddenly my player got error.

P/S , alrady changed. it gives out reward, but some players still errors

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   2
  • Joined:  10/09/12
  • Last Seen:  

The chance in your script is very low, you can calculate the odd.

1st part: 1/14 = 7.14% even after you succeed on 1st part, you'll have to pass through the 2nd one.

2nd part: 3/49 = 6.12%.

thx for calculation dear :)

Try this script sir, this version 1.2a maybe some bug has been fixed. Btw the reward chance really low, u nid to keep trying


//===== rAthena Script =======================================
//= Cluck! Cluck! Boom!
//===== By: ==================================================
//= Keale
//===== Current Version: =====================================
//= 1.2a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
//= stun, or make you fall asleep.
//= The prize is configurable and triggered by the NPC.
//===== Additional Comments: =================================
//= 1.0 First release.
//= 1.1 Using 'switch rand' instead.
//= 1.2 Cleaned and standardized. [Euphy]
//= 1.2a Switched 'atcommand' to 'unitskilluseid'.
//============================================================

prontera,156,219,4 script Cluckers 800,{

set .@GMAccess,80; // GM level required to access NPC

if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
case 3: sc_start SC_Freeze,10000,0; break;
case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 5: sc_start SC_Sleep,10000,0; break;
case 6: sc_start SC_Stone,10000,0; emotion 29; break;
case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 9: sc_start SC_Stun,10000,0; break;
case 10: sc_start SC_Sleep,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_Stun,10000,0; break;
case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
specialeffect2 72;
announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
getitem $cluck_item_id,$cluck_item_amount;
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
}
break;
}
end;
}
mes "[Cluckers]";
if (getgmlevel() >= .@GMAccess) {
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
next;
while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
case 1:
mes "[Cluckers]";
mes "CLUCK! ^FF0000~Sure thing!~^000000";
emotion 33;
close2;
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
initnpctimer;
end;
case 2:
mes "[Cluckers]";
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
next;
break;
case 3:
mes "[Cluckers]";
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $cluck_item_id;
next;
mes "[Cluckers]";
mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
input $cluck_item_amount;
next;
mes "[Cluckers]";
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
emotion 33;
next;
break;
case 4:
mes "[Cluckers]";
mes "Cluck cluck cluck...";
close;
}
}
mes "Cluck cluck! Cluuuuuck?";
mes "Cluck....";
close;

OnTimer10000:
announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
end;
OnTimer30000:
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
if (!$cluck_item_id) set $cluck_item_id,512;
if (!$cluck_item_amount) set $cluck_item_amount,1;
set .startcluck,1;
end;
}

P/S: Please use codebox for long script

Ok sorry.. but this didnt happened before, but don know why it suddenly my player got error.

P/S , alrady changed. it gives out reward, but some players still errors

if they still got error, im pretty sure their kro folder out of date, pls get the latest kro released on 01/01/2013 here http://www.nickyzai.com/?p=kro

p/s: if u dont mind can u give me the link to ur server?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

change

if (rand(50) < 4) {

into

if (rand(50) < 50) {

to make this having about ~7% chance of getting it win ( 1/14 )

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...