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

Talkaction

poii

Member
Joined
Nov 11, 2008
Messages
188
Reaction score
8
Can Someone make an script that if a player lvl 100+ say !password
in x:--- y:--- z:--- then he is autommatically teleported to x:--- y:--- z:--

Requierements:
He must:
-be level above 100
-be on a certain sqm
-say the secret word

What will happen?
he will be teleported to
x spot
 
Somthng like that, but you have to make a aid on the xyz player should stand
and fill the locals and see the result.
ok look
go to movement.xml and paste this
Code:
<movevent type="StepIn" actionid="1798" event="script" value="pass.lua"/>
	<movevent type="StepOut" actionid="1798" event="script" value="pass.lua"/>


then go to movement-->scripts creat new file called pass and paste this
LUA:
local pos= {x=1000,y=1000,z=7}   -- where tp will teleport player
local storage =  3000 -- need storage need to be same as the one in talkaaction
function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid,storage) == 2 then
   doTeleportThing(cid,pos)
 doSendMagicEffect(getCreaturePosition(cid), 10)
   
return true
end
if getPlayerStorageValue(cid,storage) == 3 then
   doTeleportThing(cid, fromPosition, TRUE)
    
     doCreatureSay(cid,"The pass you entered is wrong.",TALKTYPE_ORANGE_1)
	 doSendMagicEffect(getPlayerPosition(cid), 2)
return true
end
if getPlayerStorageValue(cid,storage) == 1 then
   doTeleportThing(cid, fromPosition, TRUE)
    
     doCreatureSay(cid,"You have to type <!pass (type password)> then click enter to pass.",TALKTYPE_ORANGE_1)
	 doSendMagicEffect(getPlayerPosition(cid), 2)
return true
end
doCreatureSay(cid,"Please type <!pass (type password)> then click enter.",TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,storage,1)
doTeleportThing(cid, fromPosition, TRUE)


return true
end
function onStepOut(cid, item, position, fromPosition)
if getPlayerStorageValue(cid,storage) == 2 then
setPlayerStorageValue(cid,storage,-1)
return true
end
end

now go to talkaction and type
Code:
<talkaction words="!pass" event="script" value="pass.lua"/>

now make new file in talkaction called pass.lua and paste this
LUA:
local storage = 3000 --same as one in movement script
local pass = "7586"
local lvl = 100
function onSay(cid, words, param)
if getPlayerLevel(cid) < lvl then
doPlayerSendCancel(cid,"You must be level "..lvl..".")
if getPlayerStorageValue(cid,storage) == 1 or getPlayerStorageValue(cid,storage) == 3 then
  if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to write a password.")
		return true
	end
 if (param ~= pass) then
   doCreatureSay(cid,"Sorry,error password!",TALKTYPE_ORANGE_1)
	   doSendMagicEffect(getCreaturePosition(cid), CONSTANT_ME_POFF)
	   setPlayerStorageValue(cid,storage,3)
return true
end
setPlayerStorageValue(cid,storage,2)
doCreatureSay(cid,"Good job now you can pass.",TALKTYPE_ORANGE_1)
 return true
 end
return true
end
So it works like that:
Player eneter tp he get msg to type pass word.Player Say !pass(password) if pass wrong he isnt tped if pass write he is tped .
 
Back
Top