• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Manarune script now working

George00

propro
Joined
Jan 11, 2014
Messages
163
Solutions
1
Reaction score
10
Location
propro
[10/07/2014 20:48:32] [Error - LuaScriptInterface::loadFile] data/actions/scripts/other/manarune.lua:1: '=' expected near 'onUse'
[10/07/2014 20:48:32] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/manarune.lua)
[10/07/2014 20:48:32] data/actions/scripts/other/manarune.lua:1: '=' expected near 'onUse'

I want a manarune script that doesnt end, does not remove after use, shows how much u heal and heals after lvl/ml

http://pastebin.com/tgMcnYqL<<<<<my current script but it gives me those errors.. can you check whats wrong with it
 
Change
Code:
unction onUse(cid, item, frompos, item2, topos)
To
Code:
function onUse(cid, item, frompos, item2, topos)
 
Remove (line 37 till 45)
Code:
if getPlayerMana(item2.uid) == manaMax then
     if getPlayerPosition(cid).x == getPlayerPosition(item2.uid).x and getPlayerPosition(cid).y == getPlayerPosition(item2.uid).y then
               doPlayerSendCancel(item2.uid, "Your mana is already full.")
               doChangeTypeItem(item.uid, item.type)
         else
               doPlayerSendCancel(cid, "" .. getPlayerName(item2.uid) .. " mana is already full.")
               doChangeTypeItem(item.uid, item.type)
         end
else

And (line 57)
Code:
end
 
21:52:59] [Error - LuaScriptInterface::loadFile] data/actions/scripts/other/manarune.lua:55: 'end' expected (to close 'if' at line 15) near 'else'
[10/07/2014 21:53:00] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/manarune.lua)
[10/07/2014 21:53:00] data/actions/scripts/other/manarune.lua:55: 'end' expected (to close 'if' at line 15) near 'else' i must be really bad at coding or editing
 
Post the script or try again.
Remove (line 37 till 45)
Code:
if getPlayerMana(item2.uid) == manaMax then
     if getPlayerPosition(cid).x == getPlayerPosition(item2.uid).x and getPlayerPosition(cid).y == getPlayerPosition(item2.uid).y then
               doPlayerSendCancel(item2.uid, "Your mana is already full.")
               doChangeTypeItem(item.uid, item.type)
         else
               doPlayerSendCancel(cid, "" .. getPlayerName(item2.uid) .. " mana is already full.")
               doChangeTypeItem(item.uid, item.type)
         end
else

And (line 57)
Code:
end
Make sure you remove what I posted.
 
Back
Top