Jump to content

tysonlim1989

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by tysonlim1989

  1. Will automatically kick a player out from a map after a specified time.

    Example, when a player goes into a map, after 1 minute, the player will be kick out of the map.

    Thank you for helping.

    [size=4]set .timeout, 60;[/size]
    if ( .timeout == 0 ) set .timeout, 60;
    set .respawnmap$, "Prontera";
    set .respawnx, 148;
    set .respawny, 380;
    set .@dif, strnpcinfo(0);
    set .remind[.@dif], 0;
    for ( set .@i, 1; .@i <= 9; set .@i, .@i +1 )
    deletearray getd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize");
    set .nobodycounter[.@dif], 0;
    getmapxy .@map$, .@x, .@y ,1;
    set .starttime[.@dif], gettimetick(0);
    do {
    set .remaintime[.@dif], .timeout * 1 + .starttime[.@dif] - gettimetick(0);
    set .@hour[.@dif], .remainTime[.@dif] / 3600 ;
    set .@min[.@dif], .remainTime[.@dif] % 3600 / 60 ;
    set .@sec[.@dif], .remainTime[.@dif] % 3600 % 60 ;
    delwaitingroom strnpcinfo(0);
    waitingroom "Time Left = "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0;
    if ( getmapusers(.@map$) )
    set .nobodycounter[.@dif], 0;
    else {
    set .nobodycounter[.@dif], .nobodycounter[.@dif] +1 ;
    if ( .nobodycounter[.@dif] > .nobodygiveup * 1 ) break;
    }
    sleep 995;
    } while ( .remaintime[.@dif] > 1 );
    set .remaintime[.@dif], 0;
    delwaitingroom "MVP Summoner#"+ .@dif;
    mapwarp .@map$, .respawnmap$, .respawnx, .respawny;
    end;
    close2;
    [/Code]

    I'm not building a MVP room, just try to copy the art work from the script but can't really make it to work.

  2. the player just stay afk inside the event map, and it's hard for me to kick them 1 by 1 from the map. I can't start my next event until I kick all the players out from the map

    EDIT: I've updated my code again, but it won't remove if the player is not online. Anyway to solve this? Thank you.

    30001,Red_Potion,Pass,3,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ atcommand "@item 30000"; sleep2 10000; atcommand "@item 30000 -1"; sleep2 1000; atcommand "@warp prontera 148 383"; },{},{}[/Code]

  3. I wanted to make a paper that will teleport a player back to save point after a period of time for my event. If not the player will forever staying inside the map. The item will gone after logoff or times up.

    EDIT: I've updated my code again, but it won't remove if the player is not online. Anyway to solve this? Thank you.

    30001,Red_Potion,Pass,3,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ atcommand "@item 30000"; sleep2 10000; atcommand "@item 30000 -1"; sleep2 1000; atcommand "@warp prontera 148 383"; },{},{}[/Code]

    Just an idea,

    is that possible to use "duration" here to delete the item? If yes, how to put in the function into the item?

    Thank you for helping.

  4. Hi there, I need lots of help. Hope someone can guide me through my entire script

    I would like to make a championship battle(PVP 1 vs 1) script.

    1) Broadcast when registration is open. Every hour from 2pm to 5pm.

    2) Auto open registration every saturday 2pm - 6pm. (Battle start from 7pm-10pm) 180mins

    3) Only 32people will be allowed. (80+16) (40+8) (20+4) (10) total 178mins

    4) Random assign for Opponents.

    5) Will broadcast who vs who 1min before the battle start.

    6) At 7pm, npc will start letting player( the 1st group) to enter the battle stage. The battle will last for 5mins.

    7) There will be 1 min interval for every battle.

    8) If draw, consider both players are lose.

    9) Winner will continue the battle.

    Below is the script I build so far.

    
    
    
    //Auto broadcast
    OnInit:
    set .Time,10080;  // Announce every x Minutes.
    announce "Registration is open";
    
    OnMinute60:
    announce "Only 3 hours left for registration"
    OnMinute120:
    announce "Only 2 hours left for registration"
    OnMinute180:
    announce "Only 1 hour left for registration"
    OnMinute230:
    announce "Only 10minutes left for registration"
    end;
    
    
    //Registration
    prontera,303,234,5 script Journey 100,{
    mes "[Journey]";
    mes "Welcome to RO championship!";
    mes "From here you can gain special prizes if you are the final winner!";
    mes "Do you want to join the battle?";
    next;
    switch(select("Yes:No")){
    case 1:
    case 2: mes "[Journey]";
    mes "Bye~"; 
    close;
    }
    

    Thanks for helping

  5. Hi there, I cant' find the image name for the button. Anyone can give me the name of the image and what english word supposed to have in the place? Thanks

    (Image included) I need those with red box. I've translated all others. Thank you for helping.

    bugsxo.jpg

  6. Hi there, this is my first custom item and I'm trying to add in my server but I had meet up some problem. Hope someone could help me out.

    Below is what I have and what I done.

    RO\data\lua files\datainfo\accessoryid

    ACCESSORY_IDs = { ACCESSORY_ABC = 900, }

    RO\data\lua files\datainfo\accname

    AccNameTable = { [ACCESSORY_IDs.ACCESSORY_ABC] = "_ABC", }

    RO\data\lua files\datainfo\accname_eng

    AccNameTable_Eng = { [ACCESSORY_IDs.ACCESSORY_ABC] = "_ABC", } 

    then converting those 3 files into .lub

    @echo off for /f "usebackq tokens=*" %%a in (`dir /b/s/a:d`) do ( for %%l in (%%~nxa\*.lua) do ( luac5.1.4 -o %%~nxa\%%~nl.lub %%l ) ) for %%l in (*.lua) do ( luac5.1.4 -o %%~nl.lub %%l ) pause

    Putting this 3 files into RO\data\luafiles514\lua files\datainfo

    ro/data/sprite/¾ÆÀÌÅÛ/ABC.act

    ro/data/sprite/¾ÆÀÌÅÛ/ABC.spr

    ro/data/sprite/¾Ç¼¼»ç¸®/¿©/¿©_ABC.act

    ro/data/sprite/¾Ç¼¼»ç¸®/¿©/¿©_ABC.spr

    ro/data/sprite/¾Ç¼¼»ç¸®/³²/³²_ABC.act

    ro/data/sprite/¾Ç¼¼»ç¸®/³²/³²_ABC.spr

    ro/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/collection/ABC (Bitmap img 75x100)

    ro/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/item/ABC (Bitmap img 24x24)

    item_db(re) - 30001,ABC,ABC,5,0,,0,,0,,0,0xFFFFFFFF,7,2,4096,,1,0,900,{},{},{}

    idnum2itemdesctable -

    30001#

    ABC

    Class :^777777 Headgear^000000

    Defense :^777777 0^000000

    Equipped on :^777777 Lower^000000

    Weight :^777777 10^000000

    Applicable Job :^777777 Every Job^000000

    #

    idnum2itemdisplaynametable

    30001#ABC#

    idnum2itemresnametable

    30001#ABC#

    num2itemresnametable

    30001#ABC#

    Problem 1: I got no image in my inventory and right clicking ( shown in image)

    Problem 2: When i wear it, my exe directly crashed. (using 2012-04-10aRagexeRE)

    Thanks for helping

    bugdh.jpg

    Other link:

    http://www.mediafire.com/?5545cx35o3l955j

    data_Half.rar

×
×
  • Create New...