Post your script...it is easier to adapt to 1.2Help!!!
Skull system creaturescript script in tfs 1.2?
"x" Storage = get skull "x"
I have for tfs 0.4 :s
Thx
Post your script...it is easier to adapt to 1.2
function onLogin(cid)
local frags = math.max(0, getPlayerStorageValue(cid, 20233))
local frags = math.max(0, getPlayerStorageValue(cid, 20233))
if frags >= 200 and frags < 300 then
doCreatureSetSkullType(cid, SKULL_YELLOW)
elseif frags >= 301 and frags < 450 then
doCreatureSetSkullType(cid, SKULL_GREEN)
elseif frags >= 451 and frags < 650 then
doCreatureSetSkullType(cid, SKULL_WHITE)
elseif frags >= 651 and frags < 1050 then
doCreatureSetSkullType(cid, SKULL_RED)
elseif frags > 1051 then
doCreatureSetSkullType(cid, SKULL_BLACK)
end
return true
end
function onLogin(player)
local frags = math.max(0, player:getStorageValue(20233))
if frags >= 200 and frags < 300 then
player:setSkull(SKULL_YELLOW)
elseif frags >= 301 and frags < 450 then
player:setSkull(SKULL_GREEN)
elseif frags >= 451 and frags < 650 then
player:setSkull(SKULL_WHITE)
elseif frags >= 651 and frags < 1050 then
player:setSkull(SKULL_RED)
elseif frags > 1051 then
player:setSkull(SKULL_BLACK)
end
return true
end
script.lua got no function called onKill.im have error:
[Warning - Event::checkScript] Event onKill not found. scripts/script.lua
You can use any storage, it can be changed thoughThis storage "20233" is global to skulls ?
Yes, but it still needs to be changed in a onKill script because if you just change the storage number in the login script nothing will happen.You can use any storage, it can be changed though