• 0
DevKira

@joinevent [DICE/PORING]

Question

How to make this work? Thank you!!!

image.png.fbf2e92a5a93294c71c9570fd7ddbc51.png

~~~ Please help me to this script ~~~

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

hello, @Emistry can you help me with this. please thank you

@Haruka Mayumi 

Here's my Dice Script

//===== rAthena Script ===========================================|
//= Dice Event ( crazyarashi version )                      =|
//===== By: ======================================================|
//= crazyarashi                             =|
//===== Current Version: =========================================|
//= 1.0 Initial Version                         =|
//================================================================|
//= Dice Event                             =|
//================================================================|
-    script    Dice_Event    -1,{
OnInit:
    $dice_active = 0;
    $dice_enter = 0;
    .dice_map$ = "quiz_01";
    .reward_id = 8903;
    .reward_amount = 5;
    end;
    
OnClock0000:
OnClock0300:
OnClock0600:
OnClock0900:
OnClock1200:
OnClock1500:
OnClock1800:
OnClock2100:
OnStart:
    function count_player;
    function dice_start;
    function roll_dice;
    function select_winner;
    function reward_winner;
    function check_player;
    announce "[ Dice Event ] : The Dice Event will start in 1 minute.",0;
    $dice_enter = 1;
    sleep 4000;
    announce "[ Dice Event ] : Use the @joinevent command to participate in the event.",0;
    sleep 4000;
    announce "[ Dice Event ] : The registration will close in 1 minute.",0;
    sleep 26000;
    announce "[ Dice Event ] : Use the @joinevent command to participate in the event.",0;
    sleep 4000;
    announce "[ Dice Event ] : The registration will close in 30 seconds.",0;
    sleep 30000;
    $dice_enter = 0;
    announce "[ Dice Event ] : The registration has closed.",0;
    count_player(.dice_map$);
    $dice_active = 1;
    dice_start();
    end;
    
function    dice_start    {
    sleep 3500;
    mapannounce .dice_map$,"[ Dice ] : The dice event rules are simple.",0;
    sleep 4000;
    mapannounce .dice_map$,"[ Dice ] : Pick a number from 1 to 4 and enter the box of the number you choose.",0;
    sleep 4000;
    mapannounce .dice_map$,"[ Dice ] : The players standing in the correct box will win "+.reward_amount+" "+getitemname(.reward_id)+".",0;
    sleep 4000;
    mapannounce .dice_map$,"[ Dice ] : Do not stand outside of the box, you will be automatically disqualified.",0;
    sleep 4000;
    mapannounce .dice_map$,"[ Dice ] : The dice roll will start in 10 seconds.",0;
    sleep 10000;
    mapannounce .dice_map$,"[ Dice ] : Rolling the dice.",0;
    [email protected] = roll_dice();
    mapannounce .dice_map$,"[ Dice ] : I'll announce the winning number in 10 seconds, this is your last chance to select your winning number.",0;
    sleep 10000;
    mapannounce .dice_map$,"[ Dice ] : And the winning number is.",0;
    sleep 4000;
    mapannounce .dice_map$,"[ Dice ] : Winning Number : "[email protected]+".",0;
    sleep 1000;
    select_winner([email protected]);
    check_player(.dice_map$);
    sleep 4000;
    reward_winner([email protected]);
    sleep 5000;
    $dice_active = 0;
    $dice_enter = 0;
    mapwarp .dice_map$,"midgard",200,183; 
    end;
}

function    roll_dice    {
    count_player(.dice_map$);
    [email protected] = rand(1,4);
    return [email protected];
}

function    check_player    {
    if(getmapusers(getarg(0)) == 0){
        announce "[ Dice Event ] : The Dice Event has ended with no winner. Better luck next time!",0;
        $dice_active = 0;
        $dice_enter = 0;
        end;
    }
return;
}

function    count_player    {
    if(getmapusers(getarg(0)) == 0){
        announce "[ Dice Event ] : The event has been cancelled due to lack of registration.",0;
        $dice_active = 0;
        $dice_enter = 0;
        end;
    }
    return;
}

function    reward_winner    {
[email protected] = getarg(0);
    switch([email protected]){
        case 1:
            getareaunits(BL_PC,.dice_map$,183,81,191,60,[email protected]_id$[0]);
            break;
            
        case 2:
            getareaunits(BL_PC,.dice_map$,195,81,203,60,[email protected]_id$[0]);
            break;
            
        case 3:
            getareaunits(BL_PC,.dice_map$,207,81,215,60,[email protected]_id$[0]);
            break;
            
        case 4:
            getareaunits(BL_PC,.dice_map$,219,81,227,60,[email protected]_id$[0]);
            break;
    }
    [email protected] = getarraysize([email protected]_id$);
    if([email protected] == 1){
        [email protected]$ = "winner";
    } else {
        [email protected]$ = "winners";
    }
    announce "[ Dice Event ] : The Dice Event has ended with "[email protected]+" "[email protected]$+". Thank you for participating.",0;
    for([email protected] = 0; [email protected] < [email protected]; [email protected]++){
        [email protected]_id = getcharid(0,[email protected]_id$[[email protected]]);
        [email protected]_id = getcharid(3,[email protected]_id$[[email protected]]);
        if(isloggedin([email protected]_id,[email protected]_id)){
            getitem .reward_id,.reward_amount,[email protected]_id;
            warp "SavePoint",0,0,[email protected]_id;
        } else {
            continue;
        }
    }
return;
}

function    select_winner    {
[email protected] = getarg(0);
    switch([email protected]){
        case 1:
            areawarp .dice_map$,195,81,203,60,"midgard",200,183;
            areawarp .dice_map$,207,81,215,60,"midgard",200,183;
            areawarp .dice_map$,219,81,227,60,"midgard",200,183;
            break;                            
                                              
        case 2:                               
            areawarp .dice_map$,183,81,191,60,"midgard",200,183;
            areawarp .dice_map$,207,81,215,60,"midgard",200,183;
            areawarp .dice_map$,219,81,227,60,"midgard",200,183;
            break;                           
                                              
        case 3:                               
            areawarp .dice_map$,183,81,191,60,"midgard",200,183;
            areawarp .dice_map$,195,81,203,60,"midgard",200,183;
            areawarp .dice_map$,219,81,227,60,"midgard",200,183;
            break;                            
                                              
        case 4:                               
            areawarp .dice_map$,183,81,191,60,"midgard",200,183;
            areawarp .dice_map$,195,81,203,60,"midgard",200,183;
            areawarp .dice_map$,207,81,215,60,"midgard",200,183;
            break;
        }
    }
}

quiz_01    mapflag    nowarp
quiz_01    mapflag    nowarpto
quiz_01    mapflag    noteleport
quiz_01    mapflag    nosave
quiz_01    mapflag    nomemo
quiz_01    mapflag    nobranch
quiz_01    mapflag    noloot
quiz_01    mapflag    noskill
quiz_01    mapflag    nopenalty
quiz_01    mapflag    nodrop

Here's my Poring catcher script

//===== rAthena Script ===========================================|
//= Poring Catcher ( crazyarashi version )             =|
//===== By: ======================================================|
//= crazyarashi                                                  =|
//===== Current Version: =========================================|
//= 1.0 Initial Version                                          =|
//================================================================|
//= Poring Catcher                                               =|
//================================================================|
-    script    Poring_Catcher    -1,{    
OnInit:
    $poring_active = 0;
    $poring_enter = 0;
    $poring_kill = 0;
    .poring_map$ = "poring_c01";
    .poring_multiplier = 2; //= Multiply Poring Per 2 Player. 4 Player = 2 Correct Poring.
    .reward_id = 8903;
    .reward_amount = 5;
    end;

OnClock0000:
OnClock0300:
OnClock0600:
OnClock0900:
OnClock1200:
OnClock1500:
OnClock1800:
OnClock2100:
OnStart:
    function count_player;
    function poring_start;
    function get_count;
    killmonster "poring_c01","All";
    announce "[ Poring Catcher ] : Poring Catcher Event will start in 1 minute.",0;
    $poring_enter = 1;
    sleep 4000;
    announce "[ Poring Catcher ] : Use the @joinevent command to participate in the event.",0;
    sleep 4000;
    announce "[ Poring Catcher ] : The registration will close in 1 minute.",0;
    sleep 26000;
    announce "[ Poring Catcher ] : Use the @joinevent command to participate in the event.",0;
    sleep 4000;
    announce "[ Poring Catcher ] : The registration will close in 30 seconds..",0;
    sleep 30000;
    $poring_enter = 0;
    announce "[ Poring Catcher ] : The registration has closed.",0;
    count_player(.poring_map$);
    $poring_active = 1;
    [email protected]_count = get_count(.poring_map$);
    $poring_kill = [email protected]_count;
    poring_start([email protected]_count);
    end;

OnSummonPoring:
    function anti_error;
    monster .poring_map$,0,0,"Pouring",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Porong",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Poringu",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Pourinq",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Porinq",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Por1ng",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"P0ring",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"[email protected]",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"POring",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Puring",1002,10,strnpcinfo(0)+"::OnWrongPoring";
    monster .poring_map$,0,0,"Poring",1002,$poring_kill,strnpcinfo(0)+"::OnRightPoring";
    do {
        sleep 3000;
        anti_error(1);
    }while($poring_active != 0);
    end;
      
OnWrongPoring:
    mapannounce .poring_map$,"[ Poring Catcher ] : Woooops. "+strcharinfo(0)+" has killed a wrong Poring.",0;
    warp "SavePoint",0,0;    
    sleep 2000;
    anti_error(2);
    end;
    
OnRightPoring:
    warp "SavePoint",0,0;
    getitem .reward_id,.reward_amount;
    announce "[ Poring Catcher ] : "+strcharinfo(0)+" has won "+.reward_amount+" "+getitemname(.reward_id)+" for killing the right Poring.",0;
    $poring_kill -= 1;
    if($poring_kill == 0){
        announce "[ Poring Catcher ] : The Poring Catcher Event has now ended. Thank you for participating.",0;
        $poring_active = 0;
        $poring_kill = 0;
        $poring_enter = 0;
        mapwarp "poring_c01","midgard",156,191;
        killmonster "novice","All";
        end;
    }
    anti_error(3);
    mapannounce .poring_map$,"[ Poring Catcher ] : Correct Poring left : "+$poring_kill+".",0;
    end;
    
function    anti_error    {
[email protected] = getarg(0);
switch([email protected]){
    case 1:
        if($poring_active == 0) end;
        if(getmapusers(.poring_map$) == 0){
            announce "[ Poring Catcher ] : All participants have been eliminated. There is no winner in this event.",0;
            $poring_active = 0;
            $poring_kill = 0;
            $poring_enter = 0;
            mapwarp "poring_c01","midgard",156,191;
            killmonster "poring_c01","All";
            end;
        }
        return;
    case 2:
        if($poring_active == 0) end;
        if(getmapusers(.poring_map$) == 0){
            announce "[ Poring Catcher ] : All participants have been eliminated. There is no winner in this event.",0;
            $poring_active = 0;
            $poring_kill = 0;
            $poring_enter = 0;
            mapwarp "novice","midgard",156,191;
            killmonster "poring_c01","All";
            end;
        }
        return;
        
    case 3:
        if(getmapusers(.poring_map$) == 0){
            announce "[ Poring Catcher ] : The Poring Catcher Event has now ended. Thank you for participating.",0;
            $poring_active = 0;
            $poring_kill = 0;
            $poring_enter = 0;
            mapwarp "novice","midgard",156,191;
            killmonster "poring_c01","All";
            end;
        }
        return;
    }
}

function    count_player    {
    if(getmapusers(getarg(0)) == 0){
        announce "[ Poring Catcher ] : The event has been cancelled due to lack of registration.",0;
        end;
    }
    return;
}

function    get_count    {
    [email protected] = getmapusers(getarg(0));
    if([email protected] <= 4){
        return 1;
    }
    [email protected]_poring = ([email protected]/.poring_multiplier);
    return [email protected]_poring;
}

function    poring_start    {
    sleep 3500;
    mapannounce .poring_map$,"[ Poring Catcher ] : The event rules are simple.",0;
    sleep 3500;
    mapannounce .poring_map$,"[ Poring Catcher ] : There will be 100 wrong Poring and "+getarg(0)+" correct Poring.",0;
    sleep 3500;
    mapannounce .poring_map$,"[ Poring Catcher ] : Kill the correct Poring to win "+.reward_amount+" "+getitemname(.reward_id)+".",0;
    sleep 3500;
    mapannounce .poring_map$,"[ Poring Catcher ] : If the Poring is not killed in 3 minutes the event will finish without a winner.",0;
    sleep 3500;
    mapannounce .poring_map$,"[ Poring Catcher ] : The event will start in a few seconds.",0;
    sleep 2000;
    mapannounce .poring_map$,"[ Poring Catcher ] : 3.",0;
    sleep 2000;
    mapannounce .poring_map$,"[ Poring Catcher ] : 2.",0;
    sleep 2000;
    mapannounce .poring_map$,"[ Poring Catcher ] : 1.",0;
    donpcevent strnpcinfo(0)+"::OnSummonPoring";
    end;
    }
}

poring_c01    mapflag    nowarp
poring_c01    mapflag    nowarpto
poring_c01    mapflag    noteleport
poring_c01    mapflag    nosave
poring_c01    mapflag    nomemo
poring_c01    mapflag    nobranch
poring_c01    mapflag    noloot
poring_c01    mapflag    noskill
poring_c01    mapflag    nopenalty
poring_c01    mapflag    nodrop

 

Share this post


Link to post
Share on other sites
  • 0

you should insert the script if you want some help.. and as i can see, there's no @joinevent bindcommand.

it should have something like this

OnJoinEvent:
	warp "eventmap",x,y;
end;

OnInit:
	bindatcmd "joinevent","Event::OnJoinEvent";
end;

you should have asked @crazyarashi since he made this script.. he has the best script compatible for this one.
but here, you can save and load this.. there might be some inconsistencies.

-	script	joinevent	-1,{

OnJoinEvent:
	if($dice_enter)
		warp "quiz_01",204,92;
	else if($poring_enter)
		warp "poring_c01",100,100;
end;

OnInit:
	bindatcmd "joinevent","joinevent::OnJoinEvent";
end;
}

 

Edited by Haruka Mayumi

Share this post


Link to post
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.

Loading...