KnightmareZ
New Member
Hi, I am making a war server and want charatcers to comes to like.. deffrent temples each time they relog..
I tried some changes in login.lua with help from a friend but didnt work;S
I tried some changes in login.lua with help from a friend but didnt work;S
Code:
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local rand = math.random(1,2)
if rand == 1 then
doTeleportThing(cid, {x = 1043, y = 1204, z = 7}, FALSE}
elseif rand == 2 then
doTeleportThing(cid, {x = 1097, y = 1219, z = 7}, FALSE}
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end