LucasFerraz
Systems Analyst
Hello guys, i need a help with it.
Here is where in .lua I need help.
Example !ring transfer, PLAYER_TARGET_NAME then PLAYER_TARGET_getPlayerGUID(cid)) and PLAYER_TARGET_NAME must be set in Quote above.
- - - Updated - - -
Solved, close
Here is where in .lua I need help.
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "aid", PLAYER_TARGET_getPlayerGUID(cid)+10000)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "description", "This item belongs to " .. PLAYER_TARGET_getPlayerName(cid) .. ".")
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "owner", PLAYER_TARGET_getPlayerGUID(cid))
Example !ring transfer, PLAYER_TARGET_NAME then PLAYER_TARGET_getPlayerGUID(cid)) and PLAYER_TARGET_NAME must be set in Quote above.
LUA:
if param == "transfer" then
if getPlayerMoney(cid) >= 10000 then
if (getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 2357) then
if(getPlayerSlotItem(cid, CONST_SLOT_RING).actionid) == (getPlayerGUID(cid)+10000) then
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerRemoveMoney(cid, 10000)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "aid", PLAYER_TARGET_getPlayerGUID(cid)+10000)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "description", "This item belongs to " .. PLAYER_TARGET_getPlayerName(cid) .. ".")
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_RING).uid, "owner", PLAYER_TARGET_getPlayerGUID(cid))
else
doPlayerSendCancel(cid, "You cannot transfer a ring that isn\'t yours.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You must place your ring in correct slot.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You do not have enough money.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
- - - Updated - - -
Solved, close
Last edited: