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

[Request] Backpacks Of Runes With Levers

Tony

New Member
Joined
Sep 23, 2007
Messages
81
Reaction score
0
HI, in many ots i have been able to buy backpacks of runes by using levers, and i really would like it for my server!
If anyone knows how its done please tell me :p i'm using the latest TFS,

Thanks,
Tony
 
Last edited:
There's a post about this already, should have used the search function.

Anyway here's a script to buy a Backpack of Sudden death rune.

Code:
function onUse(cid, item, frompos, item2, topos)

container = doPlayerAddItem(cid, 2003, 1) -- 2003 is the BACKPACK ID. CAN BE CHANGED

if item.itemid == 1945 and doPlayerRemoveMoney(cid,6500) == 1 then -- 6500 THE PRICE
	for i = 1,20 do
	doAddContainerItem(container, 2268, 3) -- 2268, 3 is SD with 3 charges
	end
	doTransformItem(item.uid,item.itemid+1)
 
elseif item.itemid == 1946 and doPlayerRemoveMoney(cid,6500) == 1 then -- 6500 THE PRICE
	for i = 1,20 do
	doAddContainerItem(container, 2268, 3) -- 2268, 3 is SD with 3 charges
	end
	doTransformItem(item.uid,item.itemid-1)
 
else
doPlayerSendCancel(cid,"A backpack of sudden death runes costs 6500 gps.")
end

return 1
end

Save the script in your actions folder.
Name it SD.lua
Set out a lever with your map editor.
Put an UNIQUE ID on it (example 2000)

Add this line to your actions.xml
Code:
<action uniqueid="2000" script="sd.lua" />

Rep me if it helped :)
 
Back
Top