NPC Command

-Raz0rfang-

Golden Oldie
Golden Oldie
Jan 30, 2006
831
0
123
Banned
Bit confused on an NPC command

I want to teleport someone to a cave but only if they are level 65+

The command atm is
#IF
checklevel > 65

Any ideas on the error?\

And any ideas on the command for closing a cave for teleporting to at a certain level?

Thanks
 
Last edited:

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
firstly what error secondly why dont you use

#IF
checklevel 65

that way there is no confusion, for allowing access after 65 put it in the main #act for not showing it put it in the #else section
 
Upvote 0

SoulReaper

Dedicated Member
Dedicated Member
Apr 14, 2004
110
0
63
[@main]
#IF
checklevel 65
#ACT
goto @heslevel65
#ELSESAY
Sorry your to low my friend.
<Leave/@exit>
#Say
ok you high enough to enter, but bewarned it hard\
you still wish to enter?
<Enter/@heslevel65]
<Leave/@Exit>

[@heslevel65]
#ACT
mapmove 611
give TownTeleport 1
break

Hope that helps mate.
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
soulreaper that script has a serious problem, you are calling a goto in your act function and have a #say command...

you cant have both in the same section...

i suggest you take out your goto @heslevel65
 
Upvote 0

stephenking

I HAVE A DREAM!!
Developer
Aug 28, 2005
616
39
175
Netherlands
-Raz0rfang- said:
Bit confused on an NPC command

I want to teleport someone to a cave but only if they are level 65+

The command atm is
#IF
checklevel > 65

Any ideas on the error?\

And any ideas on the command for closing a cave for teleporting to at a certain level?

Thanks

think it whas > 65 meens 65 and above
for example to close for lvl

#IF
checklevel > 65
checklevel < 70
#ACT
goto @between

[@between]
#SAY
You lvl is between 65 and 70

i think it will be something like this for a 65/70 cave never tried it so dunno if this works and i presume you know how to script it yourself
as some noobs will copy paste this and say "it doesnt tele to cave" :P:P
soz had to say it :P
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
SoulReaper said:
Fire thats how it is on my server and it seems to work fine. :S
thanksx
well i assume then if it all words that the #act in the first command is being overridden...
 
Upvote 0

-Raz0rfang-

Golden Oldie
Golden Oldie
Jan 30, 2006
831
0
123
Banned
Just so i get it properly

[@LT]
#IF
checkgold 1000
checklevel 65
checklevel < 70
#ACT
take GOLD 1000
GIVE TownTeleport
mapmove G012 58 78
break
#ELSESAY
You don't have enough gold to use my service!\
Be gone, don't waste my time again!\ \
<Exit/@exit>

Would that close it at level 70 and keep it open at level 65 66 67 etc etc?
Would test but not got a server online to test it :P.
 
Upvote 0

~HeavenSent~

Golden Oldie
Golden Oldie
Nov 9, 2005
2,157
17
150
Chorley
i tested the scripy on HeavenSent...


[@jinmove]
#IF
checkgold 10000
checklevel 65
checklevel < 70
#ACT
take GOLD 10000
GIVE TownTeleport
mapmove r001 100 99
break
#ELSESAY
You don't have enough gold to use my service!\
Be gone, don't waste my time again!\ \
<Exit/@exit>



It only tellyports you when your Level 65+ & it dosent stop you from tellying there at all i got up to lvlel 100 b4 i gave up.


/HS
 
Upvote 0

stephenking

I HAVE A DREAM!!
Developer
Aug 28, 2005
616
39
175
Netherlands
testes it and your right whas a shat script tbh (it whas out my head tho without being on server)

tho tested it and fixed it this will work as i made it while testing

[@jinmove]
#IF
checkgold 10000
checklevel 65
#ACT
goto @1ok
#ELSESAY
You don't have enough gold or to low/high lvl\
Be gone, don't waste my time again!\ \
<Exit/@exit>

[@1ok]
#IF
checklevel 70
#SAY
Your to high of a level.\
Be gone, don't waste my time again!\ \
<Exit/@exit>
#ELSEACT
take GOLD 10000
GIVE TownTeleport
mapmove 0 331 269


as you see its not realy complicated after all :P
 
Upvote 0