Mikuch
/home/mikuch
REP++ me please if You like it
It checks if player have Premium then if not:
It check if player had last time pacc if not then:
-Teleport player to facc area (You can change coordinates in script)
-Set player Home town ID (configurable in script)
In
after
add
In
after
add
In
add file named
copy into it
30002 - set storage as U want to be storage in database
1 - Player Home Town ID
x = 100, y = 100, z = 7 - Coordinates where player should be teleported after become facc
It checks if player have Premium then if not:
It check if player had last time pacc if not then:
-Teleport player to facc area (You can change coordinates in script)
-Set player Home town ID (configurable in script)
In
Code:
data/creaturescripts/creaturescripts.xml
PHP:
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
add
PHP:
<event type="login" name="Pacccheck" event="script" value="pacccheck.lua"/>
In
Code:
data/creaturescripts/scripts/login.lua
after
PHP:
registerCreatureEvent(cid, "PlayerDeath")
add
PHP:
registerCreatureEvent(cid, "Pacccheck")
In
Code:
data/creaturescripts/scripts
add file named
Code:
pacccheck.lua
copy into it
Code:
function onLogin(cid)
if isPremium(cid) == TRUE then
if getPlayerStorageValue(cid, [COLOR="Red"]30002[/COLOR]) == -1 then
setPlayerStorageValue(cid, [COLOR="Red"]30002[/COLOR], 1)
end
elseif isPremium(cid) == FALSE then
if getPlayerStorageValue(cid, [COLOR="Red"]30002[/COLOR]) == 1 then
setPlayerStorageValue(cid, [COLOR="Red"]30002[/COLOR], -1)
doPlayerSetTown(cid, [COLOR="Magenta"]1[/COLOR])
doTeleportThing(cid, {[COLOR="Lime"]x = 381, y = 602, z = 7[/COLOR], stackpos = 1}, TRUE)
end
end
return TRUE
end
30002 - set storage as U want to be storage in database
1 - Player Home Town ID
x = 100, y = 100, z = 7 - Coordinates where player should be teleported after become facc
Last edited: