Jump to content
  • 0

request a script for clickable enchantment


Question

5 answers to this question

Recommended Posts

Posted (edited)
4729,Dexterity10,DEX+10,6,20,,10,,,,,,,,16,,,,,{ if( !TF_H ){callfunc("Hiding",4729);} skill "TF_HIDING",1; },{},{} //callfunc("func_name",itemID);

 

That is for the item itself.

function    script    Hiding    {
getinventorylist;
set @i,1;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
    {if( getitemslots(@inventorylist_id[.@i] && !@inventorylist_card2[.@i] && !@inventorylist_card3[.@i] && !@inventorylist_card4[.@i] && !@inventorylist_expire[.@i] && !@inventorylist_attribute[.@i]) //Because some gear has 4slots. Also not sure if Rental Items can have slots (poor scripting?) Also the item is not broken (Pretty sure this is how normal cards function).
        {set .@menu$,.@menu$ + getitemname(@inventorylist_id[.@i]) +":"; set .@menu[@i],.@i; set @i,@i+1;} }//Saving Menu for later use
menu .@menu$,-;
set .@j,getd(".@menu["+@menu+"]");
delitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,0,0,0,0);
getitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,@inventorylist_card1[.@j],getarg(0),0,0);
set TF_H,1;
end;
}

 

And that is the script used to make it act like a card. It's not totally refined, but it should work.

*Note - This will only work for items that don't have any cards in it.*

*Note - This will also only work once per item, in this case, once for this particular item*

Edited by GmOcean
Posted
4729,Dexterity10,DEX+10,6,20,,10,,,,,,,,16,,,,,{ if( !TF_H ){callfunc("Hiding",4729);} skill "TF_HIDING",1; },{},{} //callfunc("func_name",itemID);

 

That is for the item itself.

function    script    Hiding    {
getinventorylist;
set @i,1;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
    {if( getitemslots(@inventorylist_id[.@i] && !@inventorylist_card1[.@i] && !@inventorylist_card2[.@i] && !@inventorylist_card3[.@i] && !@inventorylist_card4[.@i] && !@inventorylist_expire[.@i] && !@inventorylist_attribute[.@i]) //Because some gear has 4slots. Also not sure if Rental Items can have slots (poor scripting?) Also the item is not broken (Pretty sure this is how normal cards function).
        {set .@menu$,.@menu$ + getitemname(@inventorylist_id[.@i]) +":"; set .@menu[@i],.@i; set @i,@i+1;} }//Saving Menu for later use
menu .@menu$,-;
set .@j,getd(".@menu["+@menu+"]");
delitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,0,0,0,0);
getitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,getarg(0),0,0,0);
set TF_H,1;
end;
}

 

And that is the script used to make it act like a card. It's not totally refined, but it should work.

*Note - This will only work for items that don't have any cards in it.*

*Note - This will also only work once per item, in this case, once for this particular item*

its still goes on the 1st slot where card item goes... 

Posted (edited)

Oh my bad, I thought that was it's intention... an easy fix....

 

Edit: I edited my first post to add it to the second slot. It can be edited to work for all 4 slots, but keep in mind that as this uses a PERM-Char variable, there is no real way to make it work universally without extensive consideration on how this will be used. What I made is only a temporary work around until you can find a better means to get what you want.

Edited by GmOcean

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...