Jump to content
  • 0

Help about this script.


Ronald

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

prontera,158,192,5    script    Run Or Die    1904,{
    if ( !.start ) {
        mes "No Event at the Moment";
        close;
    }
    if ( .start == 2 ) {
        mes "Event is running";
        close;
    }
    if ( .register_count >= .register_limit ) {
        mes "This event has reach the maximum player participations";
        close;
    }
    percentheal 100,100;
    warp "guild_vs5", 0,0;
    .register_aid[ .register_count ] = getcharid(3);
    .register_count+++;
    end;
OnWhisperGlobal:
    if ( getgmlevel() < 60 ) end;
//OnClock0000: // put all your start timer here
OnMinute20:
    if ( .start ) end;
    announce "Run or Die event registration start", 0;
    .start = 1;
    sleep 10000; // registration timer here
    announce "Run or Die event registration close", 0;
    .start = 2;
    sleep 3000;
    mapannounce "guild_vs5", "survive as long as you can !", 0;
    if ( .register_count < .register_min ) {
        announce "not enough participants for Run or Die event", 0;
        getmapxy .@map$, .@x, .@y, 1;
        mapwarp "guild_vs5", .@map$, .@x, .@y;
        goto L_reset;
    }
    while ( .start == 2 ) {
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 0;
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 1;
        monster "guild_vs5", 0,0, "Come On Baby!!!", 1904, 5 + rand(5), "", 2;
        sleep 5000;
    }
    end;
OnPCDieEvent:
OnPCLogoutEvent:
    if ( .start != 2 || strcharinfo(3) != "guild_vs5" ) end;
    while ( .register_aid != getcharid(3) && .@i < .register_count ) .@i++;
    deletearray .register_aid[.@i], 1;
    .register_count--;
    warp "SavePoint", 0,0;
    if ( .register_count > 1 ) end;
    killmonsterall "guild_vs5";
    announce "congratulations ~ the winner of Run Or Die event is "+ rid2name( .register_aid ), 0;
    getitem .reward_item_id, .reward_item_amount, .register_aid; // winner prize
    warpchar "SavePoint", 0,0, getcharid( 0, rid2name( .register_aid ) );
L_reset:
    .start = 0;
    deletearray .register_aid;
    .register_count = 0;
    end;
OnInit:
    .register_min = 2; // minimum amount of players to start this event, or else it auto-abort
    .register_limit = 100; // maximum amount of players able to participate in this event
    .reward_item_id = 12245;
    .reward_item_amount = 100;
    end;
}
guild_vs5    mapflag    nosave    SavePoint
guild_vs5    mapflag    nowarp
guild_vs5    mapflag    nowarpto
guild_vs5    mapflag    noteleport
guild_vs5    mapflag    nomemo
guild_vs5    mapflag    nopenalty
//guild_vs5    mapflag    nobranch
guild_vs5    mapflag    noicewall

It doesn't show and start. :(

It is already in the enabled in the scripts_custom :(

 

Sorry I'm not that expert in scripting

Edited by Ronald
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  12/17/11
  • Last Seen:  

Use TAB at:

prontera,158,192,5<TAB>script<TAB>Run Or Die<TAB>1904,{

and here:

guild_vs5<TAB>mapflag<TAB>nosave<TAB>SavePoint

Edited by Aoi Tokichiro
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...