• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Rooking system tfs0.3.4pl2

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
Hello... I have asked about this script many times and no one could make a good one, that works...

Can anyone help me with this?
I need a script that:
- if get player level lower than 5 and have vocation, at reconnect, it send to x,y,z to n temple position, with no vocation, 150 maxhp, 0 maxmp, cap 420.

Can someone make something like this?

And also, if player reach levels 70+, he is teleported to a x1,y1,z1 postion and n1 temple position.

Can someone make something that works for tfs034pl2 plx?
 
i don't know if thats gonna work , beacuse i started to script some days ago but u can try it.
PHP:
-- credits to arheon from otland.net
local rookTemplePosition =
{
	{x = X, y = Y, z = Z},
}
local townPostion =
{
	{x = X, y = Y, z = Z},
}
function onLogin(cid)
         if getPlayerLevel(cid) == 5 then
               doTeleportThing(cid, rookTemplePosition, TRUE)
               doSendAnimatedText(rookTemplePostion, "Welcome back to rook!", 6)
               doPlayerSetVocation(cid, 0)
               setCreatureMaxHealth(cid, 150)
               setCreatureMaxMana(cid, 0)
               doPlayerSetMaxCapacity(cid, 420)
         end
         
         elseif getPlayerLevel(cid) == 70 then
	       doTeleportThing(cid,townPostion,TRUE)
       	       doPlayerSetTown(cid, 1)
         end
   return TRUE
end
Change rookTemplePosition and townPosition to the cities positions , also if that won't work put that in login.lua

Rep++ ?
 
Mmm... there is a missing ifgetplayervocation different from 0, or no?

LUA:
local config = {
local rookTemplePosition = 
}
{x = 1000, y = 1000, z = 6}, 
local townPostion = 
{x = 1000, y = 1000, z = 6}, 

function onLogin(cid) 
         if getPlayerLevel(cid) == 8 then 
               doTeleportThing(cid, , TRUE) 
               doSendAnimatedText(rookTemplePostion, "Welcome back to rookguard, Take level 8 to leave rookguard!", 255) 
               doSendAnimatedText(playerpos, ""Welcome back to rookguard, Take level 8 to leave rookguard!"doSendAnimatedText,	(pos, text, config.colors[math.random(1, #config.colors)])
               doPlayerSetVocation(cid, 0) 
               setCreatureMaxHealth(cid, 150) 
               setCreatureMaxMana(cid, 0) 
               doPlayerSetMaxCapacity(cid, 420) 
         end 
          
         elseif getPlayerLevel(cid) == 9 then 
           doTeleportThing(cid,townPostion,TRUE) 
                  doPlayerSetTown(cid, 8) 
         end 
   return TRUE 
end

did rescript some and for the ath~ learn how to TAB youre scripts ^.^

rep? XD
 
LUA:
  local config = {
local rookTemplePosition =
}
{x = 1000, y = 1000, z = 6},
local townPostion =
{x = 1000, y = 1000, z = 6},

function onLogin(cid)
         if getPlayerLevel(cid) == 8 then
               doTeleportThing(cid, , TRUE)
               doSendAnimatedText(rookTemplePostion, "Welcome back to rookguard, Take level 8 to leave rookguard!", 255)
               doSendAnimatedText(playerpos, ""Welcome back to rookguard, Take level 8 to leave rookguard!"doSendAnimatedText,  (pos, text, config.colors[math.random(1, #config.colors)])
               doPlayerSetVocation(cid, 0)
               setCreatureMaxHealth(cid, 150)
               setCreatureMaxMana(cid, 0)
               doPlayerSetMaxCapacity(cid, 420)
         end
         
         elseif getPlayerLevel(cid) == 9 then
           doTeleportThing(cid,townPostion,TRUE)
                  doPlayerSetTown(cid, 8)
         end
   return TRUE
end

Mmm... if getPlayerLevel(cid) == 8 then sould be if getPlayerLevel(cid) == 8 and getPlayerVocation(cid) >= 1 then

And it need to actualize the promotion to 0, because server would crash... someone could fix this?
 
LUA:
function onLogin(cid)
local Posi = getTownTemplePosition(getTownId(Rookgard))

         if getPlayerLevel(cid) < 6 and getPlayerVocation(cid) ~= 0 then
               doTeleportThing(cid, Posi, TRUE)
               doSendAnimatedText(Posi, "Welcome back to rook!", 6)
               doPlayerSetVocation(cid, 0)
               setCreatureMaxHealth(cid, 150)
               setCreatureMaxMana(cid, 0)
               doPlayerSetMaxCapacity(cid, 420)
         end
   return TRUE
end

second one

LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
local Posi = getTownTemplePosition(getPlayerTown(cid))

	if (skill == SKILL__LEVEL and newLevel == 70) then
	       doTeleportThing(cid, Posi, TRUE)
               doSendAnimatedText(Posi, "Welcome back to rook!", 6)
	end
	return true
end
 
Back
Top