• 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!

Creaturescript request

Using doPlayerSetTown at the lastLogin check on your login.lua... Or do you want to spawn at the city 2 temple too :X?
 
English:
I need level 1 to level 8 ( no vocation) doPlayerSetTown =2
I dead and spawn in town 2.



En español:
Necesito que mientras no tenga vocacion, mi spawn al morir sea en la ciudad id 2... asi al morir no me enviará a la ciudad principal sin siquiera sacar la vocación. ya que uso rook system.
 
Town.lua
LUA:
function onLogin(cid)
	local storage = 2291
	             if isPlayer(cid) and getPlayerLevel(cid) < 8 and getPlayerStorageValue(cid, storage) ~= 1 then
			doPlayerSetTown(cid, 2)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
                        doPlayerSetStorageValue(cid, storage, 1)
	        elseif getPlayerStorageValue(cid, storage) == 1 or getPlayerLevel(cid) > 8 then
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			end
		return TRUE
	end
in CreatureScript.lua
LUA:
<event type="login" name="town" event="script" value="town.lua"/>
Login.lua
LUA:
registerCreatureEvent(cid, "town")
Not Test. Hope it Work :D
Sry For Tabbing it sux
 
Last edited:
Back
Top