• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

!fly temple,vip,house for vip players

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
in talkactions.xml

PHP:
	<talkaction words="!fly" event="script" value="vipteleport.lua"/>


in talkactions,scripts vipteleport.lua

l
PHP:
ocal config = {
	temple = {x = 1000, y = 1000, z = 7},
	depot = {x = 31942, y = 31965, z = 7},
	viparea = {x = 33112, y = 30931, z = 6},
	trainers = {x = 32356, y = 32542, z = 7}
}

local ctfArena = {
  frompos = {x=659, y=483, z=7},
  topos = {x=769, y=569, z=7},
}

local warArena = {
  frompos = {x=638, y=711, z=7},
  topos = {x=751, y=780, z=7},
}

function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must specify where you would like to go.")
		return true
	end

	param = param:lower()
	local tmp = getCreaturePosition(cid)
	domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then
        doPlayerSendTextMessage(cid,25,"Only Vip players can use this command!")
	return true
end

if isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) or isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not teleport while in team pvp event.")
return true
end


if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
	doPlayerSendCancel(cid, "You may not teleport while in combat.")
	return true
end
		if param == 'temple' then
			if doTeleportThing(cid, config.temple, true) then
				doSendMagicEffect(tmp, CONST_ME_POFF)
                                broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)

				doSendMagicEffect(config.temple, CONST_ME_TELEPORT)
			end
		elseif param == 'depot' then
			if doTeleportThing(cid, config.depot, true) then
				doSendMagicEffect(tmp, CONST_ME_POFF)
                                broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)

			        doSendMagicEffect(config.depot, CONST_ME_TELEPORT)
			end
		elseif param == 'vip' then
			if doTeleportThing(cid, config.viparea, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
                        broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)

			doSendMagicEffect(config.viparea, CONST_ME_TELEPORT)
			end
		elseif param == 'house' then
		
		local playerGID = getPlayerGUID(cid)
		local playerHouse = getHouseByPlayerGUID(playerGID)
		if playerHouse ~= nil then
		local housePos = getHouseInfo(playerHouse).entry
			if doTeleportThing(cid, housePos, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(housePos, CONST_ME_TELEPORT)
			end
		else
		doPlayerSendCancel(cid, "You do not own a house.")
		end	
		else
			doPlayerSendCancel(cid, "There is no such place.")
			return true
		end
	
	return true
end


all you need to do is to edit this part

domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then

for your vip system storage :)

and the positions ofc

and you can edit players cannot use in some areas like events just edit this part


local warArena = {
frompos = {x=638, y=711, z=7},
topos = {x=751, y=780, z=7},
}
 
:thumbup:

Much smaller version..

Lua:
local teleport = {
	['xxx'] = {x=100, y=100, z=7},
	['xxx'] = {x=100, y=100, z=7},
	['xxx'] = {x=100, y=100, z=7}
}

function onSay(cid, words, param, channel)
	local s = t[param:lower()]
	if s then
		if not isPlayerPzLocked(cid) then
			doTeleportThing(cid, s)
			doSendMagicEffect(s, CONST_ME_TELEPORT)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been teleported to your location.")
		else
			doPlayerSendCancel(cid, 'You cannot teleport in combat.')
		end
	else
		doPlayerSendCancel(cid, 'There is no such destination with that name.')
	end
		if isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) or isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry.. You may not teleport out of an event.")
	return true
end
 
Last edited:
it's not your script :)
it's copy/paste script from downloaded server
it was like this in the serv
Code:
local config = {
	depot = {x = 518, y = 840, z = 7},
	arena = {x = 520, y = 856, z = 8},
	trainers = {x = 593, y = 662, z = 7},
	quests = {x = 212, y = 783, z = 4}
}

local ctfArena = {
  frompos = {x=659, y=483, z=7},
  topos = {x=769, y=569, z=7},
}

local warArena = {
  frompos = {x=638, y=711, z=7},
  topos = {x=751, y=780, z=7},
}

function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must specify where you would like to go.")
		return true
	end

	param = param:lower()
	local tmp = getCreaturePosition(cid)
if getPlayerStorageValue(cid, 12699) <= 0 then
	doPlayerSendCancel(cid, "Sorry, you do not have any teleport spells.")
	return true
end

if isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) or isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not teleport while in team pvp event.")
return true
end


if getPlayerItemCount(cid, 6119) < 1 then
doPlayerSendCancel(cid, "You must have the teleport scroll in your inventory.")
return true
end

if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
	doPlayerSendCancel(cid, "You may not teleport while in combat.")
	return true
end
		if param == 'depot' then
			if doTeleportThing(cid, config.depot, true) then
				doSendMagicEffect(tmp, CONST_ME_POFF)
				doSendMagicEffect(config.depot, CONST_ME_TELEPORT)
			end
		elseif param == 'arena' then
			if doTeleportThing(cid, config.arena, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(config.arena, CONST_ME_TELEPORT)
			end
		elseif param == 'trainers' then
			if doTeleportThing(cid, config.trainers, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(config.trainers, CONST_ME_TELEPORT)
			end
		elseif param == 'quests' then
			if doTeleportThing(cid, config.quests, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(config.quests, CONST_ME_TELEPORT)
			end
		elseif param == 'house' then
		
		local playerGID = getPlayerGUID(cid)
		local playerHouse = getHouseByPlayerGUID(playerGID)
		if playerHouse ~= nil then
		local housePos = getHouseInfo(playerHouse).entry
			if doTeleportThing(cid, housePos, true) then
			doSendMagicEffect(tmp, CONST_ME_POFF)
			doSendMagicEffect(housePos, CONST_ME_TELEPORT)
			end
		else
		doPlayerSendCancel(cid, "You do not own a house.")
		end	
		else
			doPlayerSendCancel(cid, "There is no such place.")
			return true
		end
	
	return true
end
Code:
	<talkaction words="!tp" event="script" value="vipteleport.lua"/>
OWNED :p
 
PHP:
local exhausted = {
storage = 30025,
secs = 45
}

local config = { 
    temple = {x = 160, y = 54, z = 7}, 
    teleports = {x = 85, y = 96, z = 10} 
} 

local ctfArena = { 
  frompos = {x=988, y=994, z=5}, 
  topos = {x=999, y=1004, z=5}, 
} 

local warArena = { 
  frompos = {x=638, y=711, z=7}, 
  topos = {x=751, y=780, z=7}, 
} 

function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must specify where you would like to go.")
        return true
    end 

    param = param:lower()
    local tmp = getCreaturePosition(cid)
    domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then
        doPlayerSendTextMessage(cid,25,"Only Vip players can use this command!")
    return true
end 

if os.time(t) < getPlayerStorageValue(cid, 30025) then
doPlayerSendTextMessage(cid,25,"You are exhausted.")
return true
end

if isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) or isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not teleport in event.") 
return true 
end 


if hasCondition(cid, CONDITION_INFIGHT) == TRUE then 
    doPlayerSendCancel(cid, "You may not teleport while in combat.") 
    return true 
end 
        if param == 'temple' then 
            if doTeleportThing(cid, config.temple, true) then 
                doSendMagicEffect(tmp, CONST_ME_POFF) 
                                broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25) 

                doSendMagicEffect(config.temple, CONST_ME_BATS) 
				setPlayerStorageValue(cid, exhausted.storage, (os.time(t) + exhausted.secs))
            end 
        elseif param == 'teleports' then 
            if doTeleportThing(cid, config.teleports, true) then 
                doSendMagicEffect(tmp, CONST_ME_POFF) 
                                broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25) 

                    doSendMagicEffect(config.teleports, CONST_ME_BATS) 
					setPlayerStorageValue(cid, exhausted.storage, (os.time(t) + exhausted.secs))
            end 
        elseif param == 'house' then 
         
        local playerGID = getPlayerGUID(cid) 
        local playerHouse = getHouseByPlayerGUID(playerGID) 
        if playerHouse ~= nil then 
        local housePos = getHouseInfo(playerHouse).entry 
            if doTeleportThing(cid, housePos, true) then 
            doSendMagicEffect(tmp, CONST_ME_POFF) 
            doSendMagicEffect(housePos, CONST_ME_BATS)
			setPlayerStorageValue(cid, exhausted.storage, (os.time(t) + exhausted.secs))
            end 
        else 
        doPlayerSendCancel(cid, "You do not own a house.") 
        end     
        else 
            doPlayerSendCancel(cid, "There is no such place.") 
            return true 
        end 
     
    return true 
end
 
Back
Top