• 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!

Windows Token

Lua:
local ItemId = XXXX -- Token ID
local DonItem = XXXX -- ID Of Donor Item
function onUse(cid, item, frompos, item2, topos)
doPlayerAddItem(cid, DonItem)
doPlayerRemoveItem(cid, ItemId, 1)
return 1
end

this is untested hope it works
 
Lua:
local ItemId = XXXX -- Token ID
local DonItem = XXXX -- ID Of Donor Item
function onUse(cid, item, frompos, item2, topos)
doPlayerAddItem(cid, DonItem)
doPlayerRemoveItem(cid, ItemId, 1)
return 1
end

this is untested hope it works
lrn2tab

Lua:
local token = 2624
local possibleItems = {2485, 2023, 2039, 2049, 3567} -- change for whatever the fuck you want to get from tokens
function onUse(cid, item, frompos, item2, topos)		
		if doRemoveItem(cid, token, 1) then
			local newItem = math.random(#possibleItems)
			doPlayerAddItem(cid, newItem, 1)
			doPlayerSendTextMessage(cid, MESSAGE_CONSOLE_STATUS_BLUE, "You got a ".. getItemInfo(newItem).name ..".")
		end
	return true
end
I won't give you the actions.xml code.

@Down
Big deal.
 
Last edited:
lrn2tab

Lua:
local token = 2624
local newItem = math.random(xxxx, yyyy, zzzz, aaaa, bbbb, cccc) --Change for whatever the fuck you want to get from using the tokens
function onUse(cid, item, frompos, item2, topos)
		if doRemoveItem(cid, 2624, 1) then
			doPlayerAddItem(cid, newItem, 1)
			doPlayerSendTextMessage(cid, MESSAGE_CONSOLE_STATUS_BLUE, "You got a ".. newItem ..".")
		end
	return true
end
Change "xxxx" and all the others to itemid's and it will randomize the item to get, I won't give you the actions.xml code.

ye but he didnt say that he wants it to give random don items :S
 
Back
Top