i i need these 2 scripts, skull remover Example red skull/black skull and an stamina item/cake that gives u full stamina on use tho ive searched but cant find for 0.2.15 please help
- - - Updated - - -
i have this now but i get error
- - - Updated - - -
please help i need these scripts ;(
- - - Updated - - -
i have this now but i get error
Lua:
function onUse(cid, item, frompos, item2, topos)
if math.random(100) < 15 then
doPlayerRemoveItem(cid, 9969, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Unfortunately, the skull remover broke!")
return false
end
local noRemove = {SKULL_WHITE, SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)
if isInArray(noRemove, playerSkull) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
if playerSkull == SKULL_NONE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You do not have any skull!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
if playerSkull == SKULL_RED or playerSkull == SKULL_BLACK then
db.query("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your frags and skull have been succesfully removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
doPlayerRemoveItem(cid, 9969, 1)
end
return true
end
Lua:
[14/06/2013 21:59:21] mysql_real_query(): UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = 184): MYSQL ERROR: Table 'otserv.killers' doesn't exist
[14/06/2013 21:59:21] Lua Script Error: [Action Interface]
[14/06/2013 21:59:21] data/actions/scripts/other/skull remover.lua:onUse
[14/06/2013 21:59:21] data/actions/scripts/other/skull remover.lua:27: attempt to call global 'doCreatureSetSkullType' (a nil value)
[14/06/2013 21:59:21] stack traceback:
[14/06/2013 21:59:21] [C]: in function 'doCreatureSetSkullType'
[14/06/2013 21:59:21] data/actions/scripts/other/skull remover.lua:27: in function <data/actions/scripts/other/skull remover.lua:1>
- - - Updated - - -
please help i need these scripts ;(