• 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 False Quest, lose health... Help!!

Loremaster7

New Member
Joined
Oct 16, 2017
Messages
29
Reaction score
4
When the player clicks on the box, he will lose blood and have 1 hp ...

Help!!!

**************

Script:

function onUse(cid, item, frompos, item2, topos)

msg = "Die!"

posplayer = getPlayerPosition(cid)

hit = math.random(50,150)

doPlayerSendTextMessage(cid, 22, msg)

if item.uid == 65457 then

doPlayerAddHealth(cid,-hit)

doSendMagicEffect(topos,12)

doSendMagicEffect(posplayer,13)

end

return 1

end

*************

My Server : OTX 7.72
 
Last edited:
i think this should work
Code:
function onUse(cid, item, frompos, item2, topos)

msg = "Die!"

posplayer = getPlayerPosition(cid)

hit =getCreatureHealth(cid) -1

doPlayerSendTextMessage(cid, 22, msg)

if item.uid == 65457 then

doPlayerAddHealth(cid,-hit)

doSendMagicEffect(topos,12)

doSendMagicEffect(posplayer,13)

end

return 1

end
 
i think this should work
Code:
function onUse(cid, item, frompos, item2, topos)

msg = "Die!"

posplayer = getPlayerPosition(cid)

hit =getCreatureHealth(cid) -1

doPlayerSendTextMessage(cid, 22, msg)

if item.uid == 65457 then

doPlayerAddHealth(cid,-hit)

doSendMagicEffect(topos,12)

doSendMagicEffect(posplayer,13)

end

return 1

end

Hi Magista, thank you for help... but this script don't work...

[28/11/2017 5:52:44] [Error - Action Interface]
[28/11/2017 5:52:44] data/actions/scripts/Renigmard/false/777.lua:eek:nUse
[28/11/2017 5:52:44] Description:
[28/11/2017 5:52:44] data/actions/scripts/Renigmard/false/777.lua:16: attempt to call global 'doPlayerAddHealth' (a nil value)
[28/11/2017 5:52:44] stack traceback:
[28/11/2017 5:52:44] data/actions/scripts/Renigmard/false/777.lua:16: in function <data/actions/scripts/Renigmard/false/777.lua:4>
 
use this
Code:
function onUse(cid, item, frompos, item2, topos)
local msg = "Die!"
local posplayer = getPlayerPosition(cid)
local hit =getCreatureHealth(cid) -1
doPlayerSendTextMessage(cid, 22, msg)
if item.uid == 65457 then
doPlayerAddHealth(cid,-hit)
doSendMagicEffect(topos,12)
doSendMagicEffect(posplayer,13)
end
return 1
end
 
use this
Code:
function onUse(cid, item, frompos, item2, topos)
local msg = "Die!"
local posplayer = getPlayerPosition(cid)
local hit =getCreatureHealth(cid) -1
doPlayerSendTextMessage(cid, 22, msg)
if item.uid == 65457 then
doPlayerAddHealth(cid,-hit)
doSendMagicEffect(topos,12)
doSendMagicEffect(posplayer,13)
end
return 1
end

Same error again =(

[28/11/2017 6:2:35] [Error - Action Interface]
[28/11/2017 6:2:35] data/actions/scripts/Renigmard/false/777.lua:eek:nUse
[28/11/2017 6:2:35] Description:
[28/11/2017 6:2:35] data/actions/scripts/Renigmard/false/777.lua:9: attempt to call global 'doPlayerAddHealth' (a nil value)
[28/11/2017 6:2:35] stack traceback:
[28/11/2017 6:2:35] data/actions/scripts/Renigmard/false/777.lua:9: in function <data/actions/scripts/Renigmard/false/777.lua:3>
 
Back
Top