Jump to content
  • 0

request random reward cluckers event ?


Question

5 answers to this question

Recommended Posts

Posted (edited)
//===== 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'.
//============================================================

glemior,208,312,4    script    Cluckers    800,{

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

    if (.startcluck) {
        specialeffect2 2;
        switch(rand(15)) {
            case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; 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 e_omg; break;
            case 5: sc_start SC_Sleep,10000,0; break;
            case 6: sc_start SC_Stone,10000,0; emotion e_gg; break;
            case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; break;
            case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; break;
            case 9: sc_start SC_Stun,10000,0; break;
            case 10: sc_start SC_Sleep,10000,0; emotion e_gg; 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 callfunc( "F_Rand", 8177,8178,8179,8179,,8180,8181,8182,8183,8184,8188,8189,8190,8191,8192,8193,8194,8201,8202,8208,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8223,8222,8224,8225,8195,8196,8176,19505 ), 1;
                    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 e_ok;
                close2;
                announce "[Cluck! Cluck! Boom!] is about to start in Glemior!",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 e_ok;
                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;
    stopnpctimer;
    if (!$cluck_item_id) set $cluck_item_id,512;
    if (!$cluck_item_amount) set $cluck_item_amount,1;
    set .startcluck,1;
    end;
}

How can i set this one that run every 2 hour

Edited by sandbox
codebox'd
  • 1
Posted

Try this

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

glemior,208,312,4    script    Cluckers    800,{

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

    if (.startcluck) {
        specialeffect2 2;
        switch(rand(15)) {
            case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; 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 e_omg; break;
            case 5: sc_start SC_Sleep,10000,0; break;
            case 6: sc_start SC_Stone,10000,0; emotion e_gg; break;
            case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; break;
            case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion e_omg; break;
            case 9: sc_start SC_Stun,10000,0; break;
            case 10: sc_start SC_Sleep,10000,0; emotion e_gg; 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 callfunc( "F_Rand", 8177,8178,8179,8179,,8180,8181,8182,8183,8184,8188,8189,8190,8191,8192,8193,8194,8201,8202,8208,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8223,8222,8224,8225,8195,8196,8176,19505 ), 1;
                    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 e_ok;
                close2;
                announce "[Cluck! Cluck! Boom!] is about to start in Glemior!",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 e_ok;
                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;
    stopnpctimer;
    if (!$cluck_item_id) set $cluck_item_id,512;
    if (!$cluck_item_amount) set $cluck_item_amount,1;
    set .startcluck,1;
    end;

OnMinute00:
	if(gettime(3) % 2 == 0) {
		initnpctimer;
                announce "[Cluck! Cluck! Boom!] is about to start in Glemior!",bc_blue;
	}
	end;

}
  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...