Jump to content
  • 0

@joinevent [DICE/PORING]


DevKira

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  10/04/19
  • Last Seen:  

How to make this work? Thank you!!!

image.png.fbf2e92a5a93294c71c9570fd7ddbc51.png

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  10/04/19
  • Last Seen:  

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;
    .@dice = 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 : "+.@dice+".",0;
    sleep 1000;
    select_winner(.@dice);
    check_player(.dice_map$);
    sleep 4000;
    reward_winner(.@dice);
    sleep 5000;
    $dice_active = 0;
    $dice_enter = 0;
    mapwarp .dice_map$,"midgard",200,183; 
    end;
}

function    roll_dice    {
    count_player(.dice_map$);
    .@count = rand(1,4);
    return .@count;
}

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    {
.@box = getarg(0);
    switch(.@box){
        case 1:
            getareaunits(BL_PC,.dice_map$,183,81,191,60,.@player_id$[0]);
            break;
            
        case 2:
            getareaunits(BL_PC,.dice_map$,195,81,203,60,.@player_id$[0]);
            break;
            
        case 3:
            getareaunits(BL_PC,.dice_map$,207,81,215,60,.@player_id$[0]);
            break;
            
        case 4:
            getareaunits(BL_PC,.dice_map$,219,81,227,60,.@player_id$[0]);
            break;
    }
    .@size = getarraysize(.@player_id$);
    if(.@size == 1){
        .@word$ = "winner";
    } else {
        .@word$ = "winners";
    }
    announce "[ Dice Event ] : The Dice Event has ended with "+.@size+" "+.@word$+". Thank you for participating.",0;
    for(.@i = 0; .@i < .@size; .@i++){
        .@char_id = getcharid(0,.@player_id$[.@i]);
        .@account_id = getcharid(3,.@player_id$[.@i]);
        if(isloggedin(.@account_id,.@char_id)){
            getitem .reward_id,.reward_amount,.@account_id;
            warp "SavePoint",0,0,.@char_id;
        } else {
            continue;
        }
    }
return;
}

function    select_winner    {
.@winner = getarg(0);
    switch(.@winner){
        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;
    .@poring_count = get_count(.poring_map$);
    $poring_kill = .@poring_count;
    poring_start(.@poring_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,"P@ring",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    {
.@i = getarg(0);
switch(.@i){
    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    {
    .@count = getmapusers(getarg(0));
    if(.@count <= 4){
        return 1;
    }
    .@count_poring = (.@count/.poring_multiplier);
    return .@count_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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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