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

Release City script.

Ates.tr

Im back
Joined
Nov 11, 2007
Messages
1,046
Reaction score
2
Location
Sweden
I'll just training on scripting so maybe this will work i dont know cause not tested,

Can be useful for peoples.

PHP:
-- Script by Ates
function onStepIn(cid, item, pos)

                 -- /Pos,Msg,TownID/--
local config = {
     [40000] = {x=1000, y=1001, z=7, "You are a citizen of Thais now.", 1},
	 [40001] = {x=1000, y=1002, z=7, "You are a citizen of Venore now.", 2},
	 [40002] = {x=1000, y=1003, z=7, "You are a citizen of Carlin now.", 3},
	 [40003] = {x=1000, y=1004, z=7, "You are a citizen of Kazardoon now.", 4},
	 [40004] = {x=1000, y=1005, z=7, "You are a citizen of Svargrond now.", 5},
	 [40005] = {x=1000, y=1006, z=7, "You are a citizen of Ankrahmun now.", 6}
}
local teleport = 1387


     if isPlayer(cid) == TRUE then
     for action, variable in pairs(config) do
if item.id == teleport then
	 doCreatureSay(cid, variable[2], TALKTYPE_ORANGE_1)
	 doPlayerSetTown(cid, variable[3])
	 doTeleportThing(variable[1])
	 doSendMagicEffect(variable[1],2)
     end
     return TRUE
	 end
end

Edited1: A bug fix
Edited2: One more bug fix, also changed text.
Edited3: More bugs fixed and changed text again.
 
Last edited:
Code:
function onStepIn(cid, item, position, fromPosition)
local town = getPlayerTown(cid)
	if(item.actionid > 30020 and item.actionid < 30100) then
	    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Now you are Resident of " .. getTownName(town) .. ".")
		doPlayerSetTown(cid, item.actionid - 30020)
	end
	return TRUE
end
 
Back
Top