Sanasol Posted January 10, 2012 Posted January 10, 2012 Description: Get card id from ANY item it is desirable to check the unique thing Download: src code Definition: BUILDIN_DEF(getitemcard,"ii") I have used it for: needed something that could be transferred, using another player's effect was removed from the owner Sample: getarg(0) - item_id set @card2,getitemcard(getarg(0),2); set @card3,getitemcard(getarg(0),3); set @charid,(@card3*pow(2,16)+@card2); set @cur_charid,getcharid(0); if(@cur_charid == @charid) { //my own item - ok } else { //not my own item - change owner delitem2 getarg(0),1,1,0,0,254,0,@card2,@card3; getnameditem(getarg(0),getcharid(0)); } Quote
Emistry Posted January 10, 2012 Posted January 10, 2012 isnt this is the same thing ?? *getequipcardid(<equipment slot>,<card slot>) Returns value from equipped item slot in the indicated slot: getequipcardid(num,slot) where: num = equip position slot slot = 0,1,2,3 (Card Slot N) This func returns CARD ID, 255,254,-255 (for card 0, if the item is produced) it's useful when you want to check item cards or if it's signed. Useful for such quests as "Sign this refined item with players name" etc; Hat[0] +4 -> Player's Hat[0] +4 Quote
Lilith Posted January 10, 2012 Posted January 10, 2012 (edited) The script returns card id of item even if the item isn't equipped. i think like ... getinventorylist; @inventorylist_card1, @inventorylist_card2 etc.. Edited January 10, 2012 by Lilith Quote
KeyWorld Posted January 10, 2012 Posted January 10, 2012 It's a little useless if you have the same item several times... It will check the latest each time. That's why I think it's better to use the getinventorylist() stuff for this check. Quote
Sanasol Posted January 10, 2012 Author Posted January 10, 2012 never used getinventorylist, so do not know thx 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.