Hello guys, this script will change town to "1", teleport player to temple and clean your house and send your items to depot.
Is a simple script, I know that is large and could be reduced, if anyone has any idea to improve it post here.
Tested on TFS 0.4 put should work on others for its simplicity!
add this to your lib/function.lua:
add in data/creaturescripts/scripts/login.lua after function onLogin(cid)
Configuration:
local pos = position that the player will be teleported
local town = id of free town
Credits
Sorry for my bad english, REP ++
Is a simple script, I know that is large and could be reduced, if anyone has any idea to improve it post here.
Tested on TFS 0.4 put should work on others for its simplicity!
add this to your lib/function.lua:
Code:
function doRemoveHouse(cid)
local pid = getPlayerGUID(cid)
cleanHouse(getHouseByPlayerGUID(pid))
setHouseOwner(getHouseByPlayerGUID(pid), NO_OWNER_PHRASE,true)
return TRUE
end
add in data/creaturescripts/scripts/login.lua after function onLogin(cid)
Code:
if(getPlayerPremiumDays(cid) >= 1 and getPlayerStorageValue(cid, 759759) <= 0) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Activate premium privileges.")
setPlayerStorageValue(cid, 759759, 1)
doSendMagicEffect(getCreaturePosition(cid), 50)
end
local pid = getPlayerGUID(cid)
[COLOR="#0000FF"]local pos = {x = 674, y = 588, z = 7} -- position that the player will be teleported[/COLOR]
[COLOR="#FF0000"]local town = 1 -- City of free town.[/COLOR]
if(getHouseByPlayerGUID(pid) and getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 759759) >= 1) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You loose a premium privileges, items were of your home sent for your depot.")
setPlayerStorageValue(cid, 759759, -1)
doTeleportThing(cid, pos)
doPlayerSetTown(cid, town)
doSendMagicEffect(getCreaturePosition(cid), 50)
cleanHouse(getHouseByPlayerGUID(pid))
setHouseOwner(getHouseByPlayerGUID(pid), NO_OWNER_PHRASE,true)
end
if(getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 759759) >= 1) then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You loose a premium privileges.")
setPlayerStorageValue(cid, 759759, -1)
doTeleportThing(cid, pos)
doPlayerSetTown(cid, town)
doSendMagicEffect(getCreaturePosition(cid), 50)
end
Configuration:
local pos = position that the player will be teleported
local town = id of free town
Credits
- Shalk (formulate the script)
- Vodkart (Xtibia forum, For LIB funcion)
Sorry for my bad english, REP ++
Last edited: