Truly Posted December 6, 2011 Posted December 6, 2011 (edited) Hey guys, pretty small suggestion for the SVN here, basically I suggest adding the snippets for Equip2(Made by Xantara) and Rentitem2 (Made by Brian). The use of them is to the persons extent, but still its something not in rA and i think it needs to be ! Here are the related topics (Thanks to Brian for the links!) Equip2: http://www.eathena.w...howtopic=278129 And Rentitem2: http://www.eathena.w...1 ^ The topic includes these two diffs: rentitem2.diff and getequipexpiretick.diff That's about it. Edited December 6, 2011 by Truly 2 Quote
Lighta Posted December 9, 2011 Posted December 9, 2011 +1 also if I may suggest one little addon of the same kind /// Deletes items from the target/attached player. /// [Lighta] /// delitemequip emplacement,{accounID} BUILDIN_FUNC(delitemequip) { TBL_PC *sd; struct item_data* id; struct item it; int loc=0, i=0; if( script_hasdata(st,3) ) { int account_id = script_getnum(st,3); sd = map_id2sd(account_id); // <account id> if( sd == NULL ) { ShowError("script:delitemequip: player not found (AID=%d).n", account_id); st->state = END; return 1; } } else { sd = script_rid2sd(st);// attached player if( sd == NULL ) return 0; } loc = script_getnum(st,2) -1; if( loc < 0 || loc >= ARRAYLENGTH(equip) ) { return 0; } // get inventory position of item i = pc_checkequip(sd,equip[loc]); if( i < 0 ) { return 0; } id = sd->inventory_data[i]; it.nameid = id->nameid; pc_unequipitem(sd,i,3); if (pc_delitem(sd,i,1,0,3) == 0) //succes {// success script_pushint(st,0); return 0; } ShowError("script:delitemequip: failed to delete item (AID=%d item_id=%d pos=%d name=%s).n", sd->status.account_id, it.nameid, loc, id->name); st->state = END; clif_scriptclose(sd, st->oid); script_pushint(st,-1); return 1; } 1 Quote
Truly Posted December 9, 2011 Author Posted December 9, 2011 Oh hell yeah, thats a nice add too, been having to use delitem2 for a specific equip and its a bit of a pain. +1 to the add ^ Quote
Vengeance Posted January 9, 2012 Posted January 9, 2012 these are some cool commands and yes +1 for the add.. Quote
paolokupal Posted October 30, 2012 Posted October 30, 2012 Can you share me the diff for this commands i really need it for my server and also the delitem2 .. Thank you .. Quote
Lelouch vi Britannia Posted October 30, 2012 Posted October 30, 2012 Here. . . . rentitem2.diff and getequipexpiretick.diff Quote
Euphy Posted February 12, 2014 Posted February 12, 2014 Rentitem2 was implemented in 339c0a8. Any opinions on 'equip2' and 'getequipexpiretick'? Quote
AnnieRuru Posted February 15, 2014 Posted February 15, 2014 *equip2 is a must add *getequipexpiretick can work around with *getinventorylist - script kjdfkjsf -1,{ OnInit: bindatcmd "qwer", strnpcinfo(0)+"::Onaaa"; end; Onaaa: rentitem "knife", 10; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_equip[.@i] ) dispbottom getitemname( @inventorylist_id[.@i] ) +( ( @inventorylist_expire[.@i] )? " : expire in "+( @inventorylist_expire[.@i] - gettimetick(2) ) +" seconds" : "" ); } end; }but this method kinda suxthough, its mostly use to list out which items has expiration is there any practical use of getequipexpiretick ? Quote
GmOcean Posted August 26, 2014 Posted August 26, 2014 -NecroPost- http://rathena.org/board/files/file/2240-release-script-command-equip2/ This command does work. Tested on latest revision. Just add it to script.inc and script_def.inc in src/custom folder. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.