Jump to content
Vazant

Need help with making Refining Gem Vouchers clickable

Recommended Posts

Hi i'm still fairly new to the dev phase. My coder is currently on vacation for a long time and i would like some help from you guys. I currently need to know how to make the Refining Gem Vouchers "clickable" in order to obtain a Refining gem without heading over to the npc. ty

Share this post


Link to post
Share on other sites

You need to add an item use function to the item and have it output a refining gem.

I would suggest you to dig into the server files for items with a similar behavior and try to implement it yourself, it's mostly copy and paste :)

  • Like 1

Share this post


Link to post
Share on other sites

iteminfo.txt:

Spoiler

XXX    Refining Gem Voucher    n1176    10130005    0    0    0    0    0    0    31    0    0    0    0    0    0    0    0    1    99    0    10    -1,-2,-2,-2    0    -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2    0    0    -1,-2,-2,-2,-2,-2,-2,-2,-2,-2    -1,-2,-2,-2,-2,-2,-2,-2,-2,-2    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0,0    0    0,0    0,0    0    0    0    0    0    0    0    0    0    ItemUse_refgem    0    0    0    0,0    0    0   Refining Gem Voucher    0
 

XXX- ur ID from iteminfo

 

itemeffect.lua:

Spoiler

function ItemUse_refgem ( role , Item )
    local Item_CanGet = GetChaFreeBagGridNum ( role )
     if Item_CanGet < 1 then
        SystemNotice(role ,"you need at least 1 free slot to open Refining gem voucher")
        UseItemFailed ( role )
        return
    end
    GiveItem( role, 0 , 885, 1, 4 ) ----adds 1x refining gem
end

 

Edited by blazi10
  • Like 1

Share this post


Link to post
Share on other sites

Im glad im here, because of @blazi10 i know i can make a bag droping the items i want! :D
@Vazant, i make mazes drop refining vouchers, and in argent ive made an exchanger, vouchers for x lv Refining gem.

If you want i can share you that npc :D
 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.


×
×
  • Create New...