Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/17/18 in all areas

  1. 1 point
    similar topic appear in rathena forum prontera,155,180,0 script Test Instance 1_F_MARIA,{ if ( has_instance2("guild_vs2") >= 0 ) { // dispbottom has_instance2("guild_vs2") +" destroy"; instance_destroy has_instance2("guild_vs2"); } if ( ( .@ins = instance_create( "Test Instance", getcharid(CHAR_ID_ACCOUNT), IOT_CHAR ) ) < 0 ) { mes "error : "+ .@ins; close; } if ( !getstrlen( instance_attachmap( "guild_vs2", .@ins, true, ( getcharid(CHAR_ID_ACCOUNT) )+"INST" ) ) ) { mes "error : 5"; instance_destroy .@ins; close; } instance_set_timeout 3600, 15, .@ins; instance_init .@ins; warp has_instance("guild_vs2"), 49,49; end; } guild_vs2,49,49,5 script test dialog 1_F_MARIA,{ dispbottom strnpcinfo(NPC_MAP); mesf "%d monsters on this map", 'amount; next; select "Destroy"; instance_destroy; end; OnInstanceInit: monster has_instance("guild_vs2"), 49,49, "--ja--", PORING, 10, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead"; 'amount = 10; end; OnMobDead: --'amount; if ( !'amount ) instance_announce -1, "all monster killed", bc_map; end; } few things noted for hercules ones 1. hercules has more instance related script commands, but also make this more flexible to write once you learn them all a. hercules has *instance_attach script command, make sure this script command is added before trying do anything instance related in the register npc b. hercules has to emulate the map name with *instance_attachmap if the map name doesn't follow the syntax <number>@<5 string limit> 2. hercules instance ID start from 0, rathena instance ID start from 1 a. make sure the instance_announce is set to -1 3. hercules seems cannot *instance_destroy inside the instance map itself ... has to rely on *instance_set_timeout of the timeout value
  2. 1 point
    OmarAcero

    Como traudizir as habilidades?

    You can try editing this file: skillinfolist.lub ( SkillName: " Name skill " )
  3. 1 point
    OmarAcero

    Como traudizir as habilidades?

    to edit the skill description you have to open this folder: data\luafiles514\lua files\skillinfoz\ and look for the file skilldescript.lub
  4. 1 point
    danielpqb

    [HELP] Item delay

    Forgot to mension that with this solution you need to add "Delay: 1" in itemdb_conf to work.
  5. 1 point
    danielpqb

    [HELP] Item delay

    Thank you for your help. Actually I didn't understand what you mean with "add a variable on sd", but after hours of trouble I came to a solution that works: if( sd->inventory_data[n]->delay > 0 ) { ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid ); if( nameid == ITEMID_RED_POTION || nameid == ITEMID_YELLOW_POTION || nameid == ITEMID_WHITE_POTION ) { sd->item_delay[1].nameid = ITEMID_RED_POTION; sd->item_delay[2].nameid = ITEMID_YELLOW_POTION; sd->item_delay[3].nameid = ITEMID_WHITE_POTION; } if( i == MAX_ITEMDELAYS ) /* item not found. try first empty now */ ARR_FIND(0, MAX_ITEMDELAYS, i, !sd->item_delay[i].nameid ); if( i < MAX_ITEMDELAYS ) { if( sd->item_delay[i].nameid ) {// found if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) { int e_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick)/1000); // clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, e_tick + 1); // [%d] seconds left until you can use return 0; // Delay has not expired yet } } else {// not yet used item (all slots are initially empty) sd->item_delay[i].nameid = nameid; } if( sd->item_delay[1].nameid == ITEMID_RED_POTION || sd->item_delay[2].nameid == ITEMID_YELLOW_POTION || sd->item_delay[3].nameid == ITEMID_WHITE_POTION ){ sd->item_delay[1].tick = tick + 5000; sd->item_delay[2].tick = tick + 5000; sd->item_delay[3].tick = tick + 5000; goto limpartudo; } if (!(nameid == ITEMID_BOARDING_HALTER && pc_hasmount(sd))) { sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay; } } else {// should not happen ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id); } //clean up used delays so we can give room for more limpartudo: for(i = 0; i < MAX_ITEMDELAYS; i++) { if( DIFF_TICK(sd->item_delay[i].tick, tick) <= 0 ) { sd->item_delay[i].tick = 0; sd->item_delay[i].nameid = 0; } } } I wonder if you could help me with a better solution, because my code is an outrage to the community. hahahahahah I thank you all for the good cooperation!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.