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

{request} i need script please

andrewss

Nice Member
Joined
Jun 12, 2010
Messages
122
Reaction score
1
Location
E G Y P T
i need script when one go teleport if he know password can go if he don't
know he can't go
when go message: {if you know password to pass write it here {............}
if he write the password message :{good job now you can pass}
if not the password message : {sorry,error password}

the password is : 85424

please i want tihs script :(
if you give me script i will rep++ for you

sorry for bad english
 
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,{x=1000,y=1000,z=7})
   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,3000) == 2 then
setPlayerStorageValue(cid,3000,-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"
function onSay(cid, words, param)
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 cant enter if pass write he can enter .
 
Back
Top Bottom