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

Very Special Script! LOOK NOW

ugurdrahs

New Member
Joined
May 6, 2010
Messages
555
Reaction score
2
Location
Netherland
Hiho,

Does someone have this script;

-When a player advance to level 35, he gets an message like "when u say !dragon, u will be teleported to a place with dragons"
- And than he gets teleported to the place example: 31281,31237,7
- But he can only use the "!dragons command <b>ONE</b> time,
- And after<b>level 60 the !dragons command wont work</b>, even if he didnt use it one time.


I dont know if its possible to make such a script :P
but I really hope someone have any ideas how to make this, or maybe someone already have this script!:P


a big repp+ for the helper
 
Last edited:
creaturescript, remember to register both in creaturescripts.xml and login.lua
<event type="advance" name="dragons" event="dragons" value="dragons.lua"/>
Code:
function onAdvance(cid, skill, oldLevel, newLevel)
 
if(skill == SKILL__LEVEL and newLevel >= 35 and getPlayerStorageValue(cid, 58557) == -1) then
   setPlayerStorageValue(cid, 58557, 1)
   doPlayerSendTextMessage(cid,22,"Type !dragons to get teleported!")
end
end



talkaction:
Code:
function onSay(cid, words, param)
local place = {x=31281, y=31237, z=7}
if getPlayerLevel(cid) >= 60 then
   doPlayerSendTextMessage(cid,22,"Your level is too high.")
   else
if getPlayerStorageValue(cid, 58557) == 1 and getPlayerLevel(cid) >= 35 then
   doTeleportThing(cid, place)
   doSendMagicEffect(place,10)
   setPlayerStorageValue(cid, 58557, 0)
elseif getPlayerStorageValue(cid, 58557) ~= 1 then
   doPlayerSendTextMessage(cid,22,"You can get there only once.")
elseif getPlayerLevel(cid) < 35 then
   doPlayerSendTextMessage(cid,22,"Your level is too low.")
end
end
return true
end

not tested, but I hope it's going to work
 
creaturescript, remember to register both in creaturescripts.xml and login.lua
<event type="advance" name="dragons" event="dragons" value="dragons.lua"/>
Code:
function onAdvance(cid, skill, oldLevel, newLevel)
 
if(skill == SKILL__LEVEL and newLevel >= 35 and getPlayerStorageValue(cid, 58557) == -1) then
   setPlayerStorageValue(cid, 58557, 1)
   doPlayerSendTextMessage(cid,22,"Type !dragons to get teleported!")
end
end



talkaction:
Code:
function onSay(cid, words, param)
local place = {x=31281, y=31237, z=7}
if getPlayerLevel(cid) >= 60 then
   doPlayerSendTextMessage(cid,22,"Your level is too high.")
   else
if getPlayerStorageValue(cid, 58557) == 1 and getPlayerLevel(cid) >= 35 then
   doTeleportThing(cid, place)
   doSendMagicEffect(place,10)
   setPlayerStorageValue(cid, 58557, 0)
elseif getPlayerStorageValue(cid, 58557) ~= 1 then
   doPlayerSendTextMessage(cid,22,"You can get there only once.")
elseif getPlayerLevel(cid) < 35 then
   doPlayerSendTextMessage(cid,22,"Your level is too low.")
end
end
return true
end

not tested, but I hope it's going to work

aint working,
when I use !dragons,

it says

20:54 You can get there only once.
 
So... does it work now?

to change message to green colour just change

doPlayerSendTextMessage(cid,22,"Your level is too high.")


to


doPlayerSendTextMessage(cid,25,"Your level is too high.")


22 --> 25
 
Cleaner Script =)

Code:
local tpPlace = {x=31281, y=31237, z=7}

function onSay(cid, words, param)
	if getPlayerLevel(cid) >= 60 then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Your level is too high.")
		return true
	end
	if getPlayerLevel(cid) <= 35 then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Your level is too low.")
		return true
	end

if getPlayerStorageValue(cid, 58557) ~= 1 then
   doTeleportThing(cid, tpPlace)
   doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
   setPlayerStorageValue(cid, 58557, 1)
else
   doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You can get there only once.")
end

return true
end

Cleaner script with green text :) (the text of looking at items and monster loot)
 
Back
Top