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

Lever which gives sudden death rune with 99 stacks for 6500 gold

Darqneez

ShaC-Ohhhh
Joined
Dec 30, 2009
Messages
72
Reaction score
2
Location
Poland/Wroclaw
Hello, I'm not good at lua so I please pro scripters from otland.net to change this script:

local items = {
[6006] = {cost = 3800, item_id = 7591, item_id_count = 1, count = 20, bp_id = 2000, drop = false}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local actual = items[item.uid]
if actual ~= nil then
if getPlayerMoney(cid) >= actual.cost then
local new_container = doCreateItemEx(actual.bp_id, 1)
for i = 1, actual.count do
doAddContainerItem(new_container, actual.item_id, actual.item_id_count)
end
local itms = doPlayerAddItemEx(cid, new_container, actual.drop)
if itms == 1 then
doPlayerRemoveMoney(cid, actual.cost)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "I bought a backpack filled with "..getItemNameById(actual.item_id))
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somehow faint")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Ohh this is too expensive")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Oh something is not worked")
end
return TRUE
end

to script, which works very similiar. I just want to obtain a normal rune with 99 stacks from lever. I don't need backpack, just 1 rune, I hope you understand me :)
 
actions/scripts/sd.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
        if item.uid == 1414 then
            if doPlayerRemoveMoney(cid, 3800) == TRUE then
				doPlayerAddItem(cid,2268,99)
			else
			doPlayerSendCancel(cid,"You don\'t have enough money.")
			return 0
			end
		end
	end

actions.xml
Code:
<action uniqueid="1414" script="visit.lua" />

[Tested on TFS 0.3.6]
 
@Darqneez
If you pull a certain lever, you'll get a backpack with runes(SDs etc), is that what you want?
I'm sure someone released a such script before.

Learn to read:
to script, which works very similiar. I just want to obtain a normal rune with 99 stacks from lever. I don't need backpack, just 1 rune, I hope you understand me :)

:D
 
Back
Top