Jump to content
  • 0

Cluckers


jigsgfx

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

hi, i have this script named Cluckers the only thing is i need to set it manually is there a way to set it up automatically every 2 hours?

here's the script..

thanks in advance more power to rathena and who ever make my request possible.. /no1


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

turbo_room,89,123,4 script Cluckers 800,{

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

cluckcluck:
if (getgmlevel() >= 60) 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 sRO Mall!",bc_blue;
initnpctimer;
end;
OnTimer10000:
announce "Please hurry below the Pet Store NPC if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten my 5x TCG! 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 5x TCG!",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 jigsgfx
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


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

There's a copy in the SVN: trunk/npc/custom/events/cluckers.txt

Using that one,

OnMinute00:
   if (gettime(3)%2 || .startcluck) end;
   announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
   initnpctimer;
   end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  08/22/12
  • Last Seen:  

Use this command to trigger your event every 2 hours.

OnMinute01:

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:  

Use this command to trigger your event every 2 hours.

OnMinute01:

That's every hour.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  08/22/12
  • Last Seen:  

Works fine to me every 2 hours /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

hi Euphy thanks but is it ok if you add the lines you give on the script that i gave? sorry dont have an idea on where i put the lines..

thanks alot

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:  

wow !

using atcommand in script should be avoided

it creates unnecessary log inside log.atcommandlog

I knew this script from eathena script release section that's why I didn't comment on that

but if putting this into SVN .... should avoid using this kind of method isn't it ?

http://www.eathena.ws/board/index.php?s=&showtopic=276907&view=findpost&p=1521218

atcommand "@nuke "+strcharinfo(0);

change that into

unitskilluseid getcharid(3), 173, 1;

@jigsgfx,

OnHour00:
OnHour02:
OnHour04:
....
OnHour22:

-- OR --

OnMinute00:
if ( gettime(3) % 2 == 1 ) end;

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

thanks please correct me if im wrong i should do this?

L_cluckannounce: <---- change this to OnMinute00:

if ( gettime(3) % 2 == 1 ) end; ??? right? or wrong?

announce "[Cluck! Cluck! Boom!] is about to start in sRO Mall!",bc_blue;

initnpctimer;

end;

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:  

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;

change into

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;
OnMinute00: // add this at the end of the script
if (gettime(3)%2 || .startcluck) end;
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
initnpctimer;
end;

just like Euphy did

  • Like 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

great thanks alot annie ill try this.. /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   0
  • Joined:  06/02/12
  • Last Seen:  

hi, Anniie can you check it out tell me if my script is correct or wrong ? if the "OnMinute00:" add correctly,

coz when the script finished the announce it supposed to be kill players who ever click the chicken.. but when i tried to click it, the script ask me again if i want to start the event.

thanks



turbo_room,89,123,4 script Cluckers 800,{

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

cluckcluck:
if (getgmlevel() >= 60) 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 sRO Mall!",bc_blue;
initnpctimer;
end;
OnTimer10000:
announce "Please hurry below the Pet Store NPC if you want to play with the crazy chicken!",bc_blue;
end;
OnTimer20000:
announce "Cluckers has eaten my 5x TCG! 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;
OnMinute00: // add this at the end of the script
if (gettime(3)%2 || .startcluck) end;
announce "[Cluck! Cluck! Boom!] is about to start in sRO Mall!",bc_blue;
initnpctimer;
end;

L_playcluck:
specialeffect2 2;
switch( rand(15) ) {
case 0:
npctalk "CLUUUUUUCK!!!";
emotion 23;
unitskilluseid getcharid(3), 173, 1;
break;
case 1:
npctalk "Cluuuuuck!~";
break;
case 2:
unitskilluseid getcharid(3), 173, 1;
break;
case 3:
sc_start SC_Freeze,10000,0;
break;
case 4:
npctalk "CLUUUUUUUUUCK!!!";
emotion 23;
unitskilluseid getcharid(3), 173, 1;
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;
unitskilluseid getcharid(3), 173, 1;
break;
case 8:
npctalk "Cluck! CLUUUCK!!";
emotion 23;
unitskilluseid getcharid(3), 173, 1;
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:
unitskilluseid getcharid(3), 173, 1;
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!!";
unitskilluseid getcharid(3), 173, 1;
}
break;
}
}


Edited by jigsgfx
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...