Sanasol Posted January 10, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 185 Reputation: 53 Joined: 01/04/12 Last Seen: February 28 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted January 10, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
Lilith Posted January 10, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share 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 Link to comment Share on other sites More sharing options...
KeyWorld Posted January 10, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share 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 Link to comment Share on other sites More sharing options...
Sanasol Posted January 10, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 185 Reputation: 53 Joined: 01/04/12 Last Seen: February 28 Author Share Posted January 10, 2012 never used getinventorylist, so do not know thx Quote Link to comment Share on other sites More sharing options...
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.