Skull system script tfs 1.2

weverton

Intermediate OT User
Joined
May 30, 2009
Messages
104
Best answers
0
Reaction score
2
Help!!!
Skull system creaturescript script in tfs 1.2?
"x" Storage = get skull "x"
I have for tfs 0.4 :s
Thx
 

Untrax

Banned User
Joined
May 29, 2012
Messages
24
Best answers
0
Reaction score
0
Help!!!
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
 
OP
weverton

weverton

Intermediate OT User
Joined
May 30, 2009
Messages
104
Best answers
0
Reaction score
2
Post your script...it is easier to adapt to 1.2
Code:
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
hello untrax
I tried to put player:
but it did not work
thanks
 

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Best answers
1
Reaction score
118
Location
Suez , Egypt
@weverton
Code:
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
 

Webo

Otland 4ever
Joined
Oct 20, 2013
Messages
610
Best answers
10
Reaction score
206
Location
Warsaw
im have error:
[Warning - Event::checkScript] Event onKill not found. scripts/script.lua
 

viking

Banned User
Joined
Aug 20, 2015
Messages
323
Best answers
0
Reaction score
20
This storage "20233" is global to skulls ?
 

Webo

Otland 4ever
Joined
Oct 20, 2013
Messages
610
Best answers
10
Reaction score
206
Location
Warsaw
@viking
This storage "20233" is global to skulls ?

IDK where im look where stroaga?
 
Joined
Sep 3, 2011
Messages
3,648
Best answers
16
Reaction score
2,277
Location
Sweden
You can use any storage, it can be changed though
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.

Because this script checks the value of storage and adds a skull for each value.
 
Top