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

Hey am asking for awsome 2 scripts

Calon

Experienced Member
Joined
Feb 6, 2009
Messages
1,070
Reaction score
21
hey otlanders
I'm asking for 2 scripts
first one is for teleport to Dp
when some player haven't PZ and want to back dp just say !dp

second one is auto remove embty bps when say !rbp

Rep+_ directly
 
First script(not tested)
Code:
local config = 
{
	dpCoords = {x = , y =, z = }
}
local text = "You are pz locked, you cannot teleport to dp."
function onSay(cid, words, param)
	if(isPlayerPzLocked(cid) == false) then
		text = "You came back to depo."
		doTeleportThing(cid, config.doCoords, true)
	end
	doPlayerSendTextMessage(cid, 22, text)
	return true
end
 
First script(not tested)
Code:
local config = 
{
	dpCoords = {x = , y =, z = }
}
local text = "You are pz locked, you cannot teleport to dp."
function onSay(cid, words, param)
	if(isPlayerPzLocked(cid) == false) then
		text = "You came back to depo."
		doTeleportThing(cid, config.doCoords, true)
	end
	doPlayerSendTextMessage(cid, 22, text)
	return true
end

What if first person won't be pz locked, and text will be? Next person will receive msg you came back to dp, and he wont be tped xd
 
Can't it be:
Code:
local config = 
{
	dpCoords = {x = , y =, z = }
}
local text1 = "You are pz locked, you cannot teleport to dp."
local text2 = "You came back to depot."

function onSay(cid, words, param)
	if(isPlayerPzLocked(cid) == true) then
	        doPlayerSendTextMessage(cid, 22, text1)		
	else
	doTeleportThing(cid, config.doCoords, true)
	        doPlayerSendTextMessage(cid, 22, text2)
        end
	return true
end
Correct me if I'm wrong :p
 
PHP:
local t = 
{     
      pos = {x=999, y=999, z=9}, -- Temple pos
}	   

 function onSay(cid, words, param)
    if(isPlayerPzLocked(cid) == true) then
		doPlayerSendCancel(cid,'You are in combat')
	  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	else
		doTeleportThing(cid, t.pos, false) 
   end
  end

Code:
<talkaction words="!dp" event="script" value="!dp.lua"/>



Make sure to give rep god damn..

EDIT: Not tested

EDIT 2: Damn .. to late ;<
 
Last edited:
i tested its not working
error in line 8

Can you post the error log ?


edit: That's odd.. I tested the script right now, i don't get any errors o_O

Well, if u still get errors try this


PHP:
local t = 
{     
      pos = {x=999, y=999, z=9}, -- Temple pos
}	   

 function onSay(cid, words, param)
    if(isPlayerPzLocked(cid) == true) then
		doPlayerSendTextMessage(cid, 22, You are in combat)
	  doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	else
		doTeleportThing(cid, t.pos, false) 
   end
  end
 
Dude comeon you cant beg for rep, if a user thinks you deserve rep then he/she will probably give you rep...:thumbup:

If i put my time in some work for another person, then give it for free to him.

I think i deserve reputation, or atleast a thanks.
I just hate people who don't gives a fuck about others and just care about themselves if you know what i mean.

I just think it's rude to ignore someone who make something to em.
 
This script will teleport you to the temple in 5 seconds (temple coords determined by map editor)

Lua:
local function teleport(cid)
	if(isPlayer(cid)) then
		if(isPlayerPzLocked(cid) or hasCondition(cid, CONDITION_INFIGHT)) then
			doPlayerSendCancel(cid, "You're PZed. You cant use this.")
			return true
		end
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		local nPos = getTownTemplePosition(getPlayerTown(cid))
		doTeleportThing(cid, nPos, true)
		doSendMagicEffect(nPos, CONST_ME_TELEPORT)
	end
	return true
end

local function animation(cid, t)
	if(isPlayer(cid)) then
		doSendAnimatedText(getCreaturePosition(cid), t, TEXTCOLOR_ORANGE)
	end
	return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isPlayerPzLocked(cid) or hasCondition(cid, CONDITION_INFIGHT)) then
		doPlayerSendCancel(cid, "You're PZed. You cannot use this.")
		return true
	end

	if(exhaustion.get(cid, item.itemid) == false) then
		for i = 1, 5 do
			addEvent(animation, i * 1000, cid, 6 - i)
		end
		addEvent(teleport, 5 * 1000, cid)
		exhaustion.set(cid, item.itemid, 5)
	else
		doPlayerSendCancel(cid, "Plx wait a few secs.")
	end
	return true
end

There's the first. Sorry I cannot replicate the second at this hour. :/
I hope these work (TFS 0.4 or maybe 3.0)

Red
 
Back
Top