• 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 Fix the script rep+

W33dRoCks

Banned User
Joined
Aug 18, 2009
Messages
475
Reaction score
1
Location
Spain
Hello i have a problem on this script:
Code:
	if item.actionid == 8007 then
	 if doPlayerRemoveMoney(cid, 3020) == 1 then --UH
			doPlayerSendTextMessage(cid,22,"You buy 20 adura vita and a bp.")
                        doSendMagicEffect(topos,12)
			doPlayerAddItem(cid,2002,1)

			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
			doPlayerAddItem(cid,2273,3)
else
		doPlayerSendCancel(cid, "You dont have enough money, you need 3020 gp.")

end

	elseif item.actionid == 8022 then
	 if doPlayerRemoveMoney(cid, 4200) == 1 then --magicwall
			doPlayerSendTextMessage(cid,22,"You buy 20 adevo grav tera and a bp.")
                        doSendMagicEffect(topos,12)
			doPlayerAddItem(cid,2002,1)

			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
			doPlayerAddItem(cid,2293,3)
else
		doPlayerSendCancel(cid, "You dont have enough money, you need 4200 gp.")

end

was actiondID, when i click the switch the fuction dont no give bp or potions
(and not any error on console!) please help
i give rep+ who's fix the script

i am using the last TFS 0.3.5
join us on http://xenoria.mine.nu and search CM Kaskitin i w8 u for show the script problem
 
Last edited:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.actionid == 8007 then
        local cost = 3020
        local containerid = 2002
        local itemid = 2273
        local charges = 3
        local count = 1
        doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
    end
    return true
end
 
Kaskitin :

Change in script -->

if doPlayerRemoveMoney(cid, 3020) == 1 then --UH

bla bla bla

if doPlayerRemoveMoney(cid, 4200) == 1 then --magicwall

1 then Change for TRUE then

Example-->
if doPlayerRemoveMoney(cid, 4200) == TRUE then --magicwall

=D
 
Back
Top