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

[Action] MagLevel and SkillLevel Doors Help

Dennis888

New Member
Joined
Mar 24, 2008
Messages
28
Reaction score
0
Location
Germany
Hey guys!
I need Help for my Idea ^^ so here it is:
I want to make an Reward room with doors, but for this idea i need: Maglevel door and for each skill 1 Door is this possible??

Iam using the Server: TFS 0.3.4

~Dennis~

P.s: yes i used the search function!^^
 
Last edited:
how can i explain it more hum

i only ask for an magic level door script like
"you need Magic Level 100 to pass the door" or what ever-> like an exp door.

And the same for the skills: Sword,Distance,Axe,Schield,Club

sorry for my eng :P
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerMagLevel(cid) == 100 then
end
return true
end
else
doPlayerSendCancel(cid, "Sorry, your magic level is not high enough.")
try this
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerMagLevel(cid) == 100 then
end
return true
end
else
doPlayerSendCancel(cid, "Sorry, your magic level is not high enough.")
try this

Works fine! thanks
 
and for the skills i think this will work

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local skillid = 1-6 -- choose here which skill 

if getPlayerSkill(cid, skillid) == 100 then
end
return true
end
else
doPlayerSendCancel(cid, "Sorry, your skills is not high enough.")
 
and for the skills i think this will work

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local skillid = 1-6 -- choose here which skill 

if getPlayerSkill(cid, 1) == 100 then
end
return true
end
else
doPlayerSendCancel(cid, "Sorry, your skills is not high enough.")

This also works, thank!
PS: Only one type of skill, so you guys know!
 
Not Tested

LUA:
local skills = { SKILL_FIST = 10, SKILL_CLUB = 10, SKILL_SWORD = 10, SKILL_AXE = 10, SKILL_DISTANCE = 10, SKILL_SHIELD = 10, SKILL_FISHING = 10 }
local magic = 100
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerMagLevel(cid, magic) == TRUE and getPlayerSkillLevel(cid, skills) == TRUE then
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can pass!")
    else
	doPlayerSendCancel(cid, "Sorry, your stats are not high enough.")
    end
    return TRUE
end

  • You can edit the skills and their levels to enter.
  • You can edit the magic level needed to enter.
 
Back
Top