• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Help with .lua two params in Talkactions

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
Hello guys, i need a help with it.

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:
Back
Top