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

Request HELP

Zarabustor

Human Being
Joined
Sep 10, 2009
Messages
186
Reaction score
0
Location
Cancun, Mexico
local config =
{
level = 30000,
itemid = 7443,
newHealth = 150000
}
local storage = 15000
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.itemid == config.itemid) then
if getPlayerLevel(cid) >= config.level then
if getPlayerStorageValue(cid, storage) == -1 then
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+config.newHealth))
setPlayerStorageValue(cid, storage, 1)
doSendAnimatedText(getCreaturePosition(cid), "HEALTH!",TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved ".. config.newhealth .." extra health points, now your health is ".. getCreatureMaxHealth(cid) .."!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may only use one health booster.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your need level 30,000k!! to use this booster.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
end

Fix it please, when I use the item not removed and

[01/04/2010 15:45:32] [Error - Action Interface]
[01/04/2010 15:45:32] data/actions/scripts/andres/hb.lua:onUse
[01/04/2010 15:45:32] Description:
[01/04/2010 15:45:32] data/actions/scripts/andres/hb.lua:16: attempt to concatenate field 'newhealth' (a nil value)
[01/04/2010 15:45:32] stack traceback:
[01/04/2010 15:45:32] data/actions/scripts/andres/hb.lua:16: in function <data/actions/scripts/andres/hb.lua:8>
 
Health booster and Mana one
you ARE making forgottenl LOL
wana both?
JDB made for me...
the script is cool and its like you want :P
I can help you since i have some things just tell me what i want and i say if i have or not lol
question: have: broadcast material?
Lotery bird? o.O
lol.
 
Back
Top