• 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 Can some one edit this?

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
I wanna have this script so I can buy runes with it instead of manas.

Code:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local container = 0
	local cost = 5000
	local potion_id = 2268
	local backpack_id = 2000
	if(item.itemid == 1945) then
		if(doPlayerRemoveMoney(cid, cost) == TRUE) then
			doTransformItem(item.uid, item.itemid+1)
			container = doPlayerAddItem(cid, backpack_id, 1)
			for i = 1, 20 do
				doAddContainerItem(container, potion_id)
			end
		else
			doPlayerSendCancel(cid,"Sorry, you don't have enough money.")
		end
	elseif(item.itemid == 1946) then
		doTransformItem(item.uid, item.itemid-1)
	end
return TRUE
end

P.S! This doesn't work at the moment.
 
how any? lolz isn't that a switch that when u use it it gets u a backpack of mana potions? so what u want rune u want to chage it to it instead of mana potion?
 
Okey. from the beginning. I want an action script that when I pull a lever I get a bp sd
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local container = 0
        local cost = 5000
        local potion_id = 2273 <--- Rune id here
        local backpack_id = 2000 <-- Bp id here
        if(item.itemid == 1945) then
                if(doPlayerRemoveMoney(cid, cost) == TRUE) then
                        doTransformItem(item.uid, item.itemid+1)
                        container = doPlayerAddItem(cid, backpack_id, 1)
                        for i = 1, 20 do
                                doAddContainerItem(container, potion_id)
                        end
                else
                        doPlayerSendCancel(cid,"Sorry, you don't have enough money.")
                end
        elseif(item.itemid == 1946) then
                doTransformItem(item.uid, item.itemid-1)
        end
return TRUE
end

That should give u a bp of UH's when u pull the switch and got the cash

Edit: oh and your gunna need to add it to action.xml 2 like the one for the script u provided but rename it to what ever you named this one :)
 
Btw switch = lever ^^ and that what i said b4..

although dats very nab script and all u need to do is change the id of potion_id = sd id xD. dats all i done

damn why u didn't sd from the begining?! lolz anywayz here it is:



Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local container = 0
        local cost = 5000
        local potion_id = 2268
        local backpack_id = 2000
        if(item.itemid == 1945) then
                if(doPlayerRemoveMoney(cid, cost) == TRUE) then
                        doTransformItem(item.uid, item.itemid+1)
                        container = doPlayerAddItem(cid, backpack_id, 1)
                        for i = 1, 20 do
                                doAddContainerItem(container, potion_id)
                        end
                else
                        doPlayerSendCancel(cid,"Sorry, you don't have enough money.")
                end
        elseif(item.itemid == 1946) then
                doTransformItem(item.uid, item.itemid-1)
        end
return TRUE
end


Try it
 
Back
Top