Script Help - #IF Commands and Syntax with Example

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Here is most of the #IF Commands with a little explanation...

OR - Used in Conjunction with Another Command to give an OR statement
Code:
CheckJob Warrior	
Or CheckJob Taoist   ;Will return True if you are a Warrior OR a Taoist
NOT - Not really used now as the ! Tag can be added instead
Code:
Gender Male    ;This returns TRUE if you ARE a Male	
!Gender Male   ;This now returns TRUE if you are NOT a Male
CHECK - This Checks a flag is set or unset
Code:
Check [001]  1    ;If the Flag 001 is set (i.e. 1) then returns True
RANDOM - Used to give a random chance of carrying on
Code:
Random 4     ;This will give a 1 in 4 chance of being True
GENDER - Checks Gender is Male
Code:
Gender  Male    ;There is no Gender Female - Use ELSEACT or ELSESAY to get Female
DAYTIME - Checks the Time of Day IN GAME
Code:
DayTime  DAY   ;Can use DAY, NIGHT
CHECKLEVEL - Does what it says on the tin.. Checks you are this level or above
Code:
CheckLevel  50
CHECKJOB - Checks your Job
Code:
CheckJob Warrior     ;Can use Wizard, Warrior or Taoist
CHECKWEAPONLEVEL - Checks the Level or your weapon - 17 being MAX'd
Code:
CheckWeaponLevel 17   ;Checks your weapon is MAX
CHECKWEAPONATOM - Checks the Element of your weapon
Code:
CheckWeaponAtom  5   ;Can use 1 - Fire, 2 - Cold, 3 - Light, 4 - Wind, 5 - Holy, 6 - Dark, 7 - Phantom
CHECKREFINEWEAPON - Checks if your weapon is ready for refine
Code:
CheckRefineWeapon   ;No variables on this one.. It’s a yes or no
CHECKWEAPONMCTYPE - Checks whether weapon is M-All, M-Nature or M-Soul
Code:
CheckWeaponType 0    ;Can be 0 - M-All, 1 - M-Nature, 2 - M-Soul
CHECKREFINEITEM - Used to check if you have the correct items for the refine you are doing
Code:
CheckRefineItem  0 5       ;The first number is the type, the second number is the Qty.  1st Number can be, 0 - Any, 1 - DC, 2 - M-Nature, 3 - M-Soul, 4 - Magic ANY
HASWEAPONATOM - Does the weapon have an Element
Code:
HasWeaponAtom     ;No variables.. It’s a yes or no
CHECKMONRECALL - CAN you have a pet?
Code:
CheckMonRecall    ;This returns true if you DON'T have a pet
STARTDAILYQUEST - Can you get a new Daily Quest?
Code:
StartDailyQuest    ;This returns true if you HAVE NOT started todays DQ
CHECKDAILYQUEST - Used to check which DQ you are no
Code:
CheckDailyQuest   8     ;Returns TRUE if you are on DQ No. 8
CHECKHORSE - Do you have a horse?
Code:
CheckHorse    ;Returns TRUE if you have a horse - believe it or not :P
CHECKRIDING - Are you sitting on your horse?
Code:
CheckRiding     ;Returns TRUE if you are sitting on your horse - dead easy this :P
CHECKITEM - Do you have a certain item (and Qty in your bag)
Code:
CheckItem WoodenStick 10      ;Checks to see if you have 10 WoodenSticks in your bag
CHECKITEMW - Do you have a certain item ON YOUR BODY
Code:
CheckItemW  WoodenStick  1    ;Checks if you have a WoodenStick somewhere on your body
CHECKGOLD - Checks if you have at least this Qty of Gold
Code:
CheckGold   5000000   ;Bit obvious this one :P
CHECKDURA - Checks the Dura/Purity of a specific SINGLE item
Code:
CheckDura  SilverOre 10  ;is it Purity 10 or Above?	
CheckDura  GoldRing  5    ;Is the Dura 5 or above?
CHECKDURAW - Same as above but for an item you are wearing
Code:
CheckDura  GoldRing  5    ;Is the Dura 5 or above?
CHECKDURAEVA - This works out the average dura of a group of items
Code:
CheckDuraEva  SilverOre  10  ;Is the average Purity of ALL the SilverOre in your bag 10 or above
DAYOFWEEK - What day is it?
Code:
DayOfWeek  Mon    ;Is it Monday, can be Mon, Tue, Wed, Thu, Fri, Sat, Sun
HOUR - What time is it?
Code:
Hour  0  22    ;Is the time between 00:00 and 22:59
MIN - What time is it?
Code:
Min  00  29    ;Is the time between  00 and 29 - This is usually used in conjunction with Hour so..	
	
#IF	
Hour 00  00	
Min   00 29    ;This checks if the time is between 00:00 and 00:29
CHECKPKPOINT - Used to check how many people you have killed (and still have the PK points for)
Code:
CheckPKPoint  2    ;This will return TRUE if you have more than 200 PK Points	
CheckPKPoint  10  ;This will return TRUE if you have more than 1000 PK Points
CHECKMONMAP - Checks a Qty of Mobs on a Map
Code:
CheckMonMap  D001  1  Oma    ;Checks if there is at least 1 Oma in Map D001	
CheckMonMap  D001  15           ;Checks if there are at least 15 mobs (of any type) in Map D001
CHECKHUM - Checks how many people are on a map
Code:
CheckHum D001  10  ;Returns true if there are at least 10 people on Map D001
CHECKPOS - Checks where you are standing
Code:
CheckPos D001,45,50,1    ;Checks you are standing in Map - D001, X - 45, Y - 50, and within 1 Square of that location
CHECKBAGGAGE - Checks if you have at least 1 space in your bag
Code:
CheckBaggage    ; No variables - just a Yes or No..
EQUAL - Checks if 1 variable is the same as another
Code:
Equal  D0  %D1   ;Are the Variables the same - Note the use of the % when reading the 2nd Variable	
Equal  D0  10	
Equal  A0  "SPAM"  ;Strings are used inside Quotation Marks
LARGE - Checks if 1 variable is LARGEr than another
Code:
Large  D0  1   ;Is the First Variable (D0) larger than 1
SMALL - Checks if 1 variable is SMALLer than another
Code:
Small  D0  10   ;Is the First Variable (D0) Smaller than 10
ELARGE - Checks if 1 variable is Equal to OR Larger than another
Code:
Elarge  D0  10   ;Is the First variable 10 or above
ESMALL - Checks is 1 variable is Equal to OR Smaller than another
Code:
Esmall  D0  10   ;Is the First variable 10 or below
CHECKNAMELIST - Checks a list of names to see if the users is in it
Code:
CheckNameList  "System\Test.txt"  ;This location is from the "QuestDiary" Folder
ISGUILDMASTER - Are you a Guild Master?
Code:
IsGuildMaster   ;No variables - Yes or No
HASGUILD - Are you in a Guild?
Code:
HasGuild ;No Variables - Yes or No
CANPROPOSECASTLEWAR - Not entirely sure but I think it is used to check if the Sabuk War is enabled
Code:
CanProposeCastleWar [Sabuk]  ;Name of the Wall inside Square Brackets
CANHAVESHOOTER - Do you already have a Siege Engine
Code:
CanHaveShooter  ;No Variables - Yes or No
CHECKFAME - Fetches your current Fame Points and Stores the result in the variable P9
Code:
CheckFame    ;Stores the value in P9, so you can then use P9 with another command i.e. Mov  D0  %P9
ISONCASTLEWAR - Is there a war on NOW
Code:
IsOnCastleWar [Sabuk]   ;Name of the Wall inside Square Brackets
ISONREADYCASTLEWAR - Is there a war coming up (This is the 1 hour BEFORE war starts)
Code:
IsOnReadyCastleWar  [Sabuk]   ;Name of the Wall inside Square Brackets
ISCASTLEGUILD - Are you in this Walls Guild
Code:
IsCastleGuild [Sabuk] ;Name of the Wall inside Square Brackets
ISATTACKGUILD - Are you in the guild that is attacking this wall
Code:
IsAttackGuild  [Sabuk]  ;Name of the Wall inside Square Brackets.  Note - This changes when the opposing guild takes the wall
ISDEFENSEGUILD - Are you in the guild that is defending the wall
Code:
IsDefenseGuild  [Sabuk]  ;Name of the Wall inside Square Brackets.  Note - This changes when the opposing guild takes the wall
CHECKSHOOTER - Checks if you have a shooter
Code:
CheckShooter   ;True means you DO have a shooter
CHECKSAVEDSHOOTER - Checks if you have a shooter STORED
Code:
CheckSavedShooter   :True means you DO have a stored shooter
CHECKCASTLEDOOR - Does the door exist?
Code:
CheckCastleDoor [Sabuk]  1   ;Does Door 1 (can be 1, 3 or 4) Exist
CHECKCASTLEDOOROPEN - Checks that the door is open
Code:
CheckCastleDoorOpen  [Sabuk]  1  ;Is Sabuk Door "1" (Can be 1, 3 or 4) Open?  True is Open
ISATTACKALLYGUILD - Are you an Ally of the CURRENT Attacking guild
Code:
IsAttackAllyGuild [Sabuk]  ;Yes or No
ISDEFENSEALLYGUILD - Are you an Ally of the CURRENT Defending guild
Code:
IsDefenseAllyGuild [Sabuk]   ;Yes or No
ISSYSOP - Are you a Restricted GM
Code:
IsSysOp   :Yes or No
ISADMIN - Are you GOD!
Code:
IsAdmin  ;Yes or No
CHECKBONUS - Are you elligible for a Bonus from Hermit
Code:
CheckBonus  ;Yes or No
CHECKMARRIAGE - Are you marriged?
Code:
CheckMarriage  ; Yes or No
CHECKMARRIAGERING - Do you have a wedding ring?
Code:
CheckMarriageRing  :Yes or No
CHECKGROUPCOUNT - Fetches the Qty of People in your Group and Stores the Value in P9
Code:
CheckGroupCount  ;No Variables - Just stores the Qty in P9

Not 100% sure what these do, so will need to test to find out.. I can guess but until I have tested I will leave them blank.

CHECKGMETERM
CHECKOPENGME
CHECKENTERGMEMAP
CHECKSERVER
CANCHARGESHOOTER
CHECKACCESSORY
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
CHECKGMETERM
CHECKOPENGME
CHECKENTERGMEMAP

GME System is Guild WAR System / Team WAR System
you have some function for the GME System..


CHECKSERVER If you have more as one Server then you can check how the Player is.


CANCHARGESHOOTER City War System, check the Balista if in Store or not
 
Upvote 0

Ultimate

Dedicated Member
Dedicated Member
May 24, 2013
77
0
32
ISSYSOP - Are you a Restricted GM



What i need for add a Restricted GM?
In admin list, what character?
 
Upvote 0

aboodman

Dedicated Member
Dedicated Member
Jun 23, 2013
24
0
28
Admin list
* Ultimate = GM with full comands
+ Ultimate1 = Mod Cant access all commands , just basic ones.
 
Upvote 0

jet20

LOMCN Veteran
Veteran
Loyal Member
May 22, 2005
458
1
64
Timisoara.RO[mania]
i have a question pls wath i miss ;SWitems[@StdModeFunc38]
#IF
IsCastleGuild [Sabuk]
#ACT
LINEMSG 6 "You can use the SWGuild items."
close

i use StdModeFunc38 on sw items but all ppl can use this items wath i need to do, to can use only sw members
 
Upvote 0

Zisha

Dedicated Member
Dedicated Member
Feb 23, 2012
165
5
44
Jet see it:

Code:
94 - SW guild members
95 - MW guild members
96 - SW  guild owners 
97 - MW guild owners
98 - Sabuk-Mudwall Members equipment
99  - Sabuk-Mudwall HOST equipment

HL_STDITEMS -> ANICOUNT.
 
Upvote 0