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

Reload Soft Boots

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Error:

Code:
[Error - LuaScriptInterface :: loadfile ] data/actions/scripts/soft.lua:21 '<eof>'
expected near 'end'
[Warning - Event ::loadScript] Cannot load script <data/actions/scripts/soft.lua>

data/actions/scripts/soft.lua:21: '<eof>' expected near 'end'
[Warning - Actions::registerEvent] Duplicate registered item aid: 555

Script:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition) 

local t = {money = 10000, item = 10021, newitem = 2640} 

  if getPlayerItemCount(cid,t.item,1) then 
  if PlayerRemoveMoney(cid,t.money) then 
    doPlayerRemoveItem(cid,t.item,1) 
    doPlayerAddItem(cid,t.newitem,1)     
    doSendMagicEffect(fromPosition, CONST_ME_POFF) 
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got a brand new pair of soft boots.") 
  else 
    doPlayerSendCancel(cid, "Sorry, is not possible.") 
  end 
  else 
    doPlayerSendCancel(cid, "Sorry, you need a " .. t.money .. " gold pieces.") 
  end 
  end 
 return true 
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition) 

local t = {money = 10000, item = 10021, newitem = 2640} 

  if getPlayerItemCount(cid,t.item,1) then 
  if PlayerRemoveMoney(cid,t.money) then 
    doPlayerRemoveItem(cid,t.item,1) 
    doPlayerAddItem(cid,t.newitem,1)     
    doSendMagicEffect(fromPosition, CONST_ME_POFF) 
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got a brand new pair of soft boots.") 
  else 
    doPlayerSendCancel(cid, "Sorry, is not possible.") 
  end 
  else 
    doPlayerSendCancel(cid, "Sorry, you need a " .. t.money .. " gold pieces.") 
  end 
  end

?
 
^.-
+bugfix
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition) 
local t = {money = 10000, item = 10021, newitem = 2640} 

	if getPlayerItemCount(cid,t.item) >= 1 then 
		if doPlayerRemoveMoney(cid,t.money) then 
			doPlayerRemoveItem(cid,t.item,1) 
			doPlayerAddItem(cid,t.newitem,1)     
			doSendMagicEffect(fromPosition, CONST_ME_POFF) 
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got a brand new pair of soft boots.") 
		else 
			doPlayerSendCancel(cid, "Sorry, you need a " .. t.money .. " gold pieces.") 
		end 
	else 
		doPlayerSendCancel(cid,"Sorry, you need a pair of worn soft boots to refill them." ) 
	end 
return true 
end
 
Back
Top