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

Health Item [I will REP++]

Synthetic_

deathzot.net
Joined
Dec 30, 2008
Messages
2,535
Reaction score
575
Well, I'm trying to make a script that when you use a rock, if you have 50k it will add 500 health

LUA:
local cost = 50000
    function onUse(cid, item, fromPosition, itemEx, toPosition)
    doPlayerRemoveMoney(cid, cost) == TRUE then
    doCreatureAddHealth(cid, 500)
    doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
    doCreatureSay(cid, "Health+.", TALKTYPE_ORANGE_1)
    elseif getPlayerMoney(cid) < cost then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough skulls.")
        end
        return TRUE
    end


Error:

Code:
[26/09/2009 19:27:43] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/health.lua)
[26/09/2009 19:27:43] data/actions/scripts/other/health.lua:3: unexpected symbol near '=='

Whats wrong with it? I will REP++
 
Last edited:
Back
Top