This guide is made for helping all the people who are trying to make things that others already made and can't get it to work anyways or simply don't have the patience to search for it..
i hope i can add as much stuff as possible and keep it updated so that we can keep the forum a bit clean and nice to read..
In this first part i will be talking about:
- Experience Pots / Scrolls
- Making a Ranking System
- Storage Orb
- ShoutOut Orb
- Using Robot System
------------
EXPERIENCE ITEMS
------------
What's this?
This allows any player ingame to use an item and get for a fixed time an experience boost (Credits to a lot of people)
How to make this?
Firstly you must decide what kind of item you want to use for exp boost.. in this example i choose to use a normal scroll, just like a teleport..
OPEN the SQL SERVER Enterprise Manager.. enter in the mir2 database.. choose Tables and right click on TBL_STDITEMS and choose OPEN TABLE -> Return All Rows..
This will make you open the stditems list.. find the item u will like to use.. i will like to use for example the TownTeleport skins so i look in the list for TownTeleport and copy it's FLD_IMGINDEX.. in the tbl_stditems add a new item called:
ExpScroll with
FLD_STDMode = 31 and
FLD_SHAPE = 0
FLD_WEIGHT = 1 or whatever u prefer
FLD_Anicount = 30 or a number which we will have to remember
set all the other fields to 0 or something that you prefer
If you prefer creating an Exp Pot u simply have to follow the same steps but this time choose a FLD_IMGINDEX showing a pot instead of a scroll.. ovviously u can choose any FLD_Imgindex for this item.. doing like this u will have an item that after double clicking it will dissapear..
Now to complete it we need to go into C:\Mirserver\M2Server\Envir\Market_Def and open QFunction-0.txt
we will have to enter the following code to make one working exp item:
this code will be called when an item with anicount = 30 is double clicked..
KILLMONEXPRATE is the command that highers the exp for a decent time.. 200 = 2x and 1800 are seconds it will be active
is u wanted a 30x for 5minutes then it will be KILLMONEXPRATE 3000 300
if you want to have more than one exp scroll.. for example some for 2x.. some for 3x and rare ones for 10x etc then you will have to follow this guide again and create more than one item in the item table and give it a different name such as ExpScroll1, ExpScroll2 and so on.. remember to give different anicount values to each items like for example ExpScroll1 with anicount 30 and ExpScroll2 with anicount 31.. in the Q-Function-0.txt u will have to simple write
------------
RANKING SYSTEM
------------
What's this?
This allows to have players ingame with different ranking according to thier levels.. this works immediately as soon as the players level ups.. (Credits to a lot of people)
How to make this?
This is an example of a working ranking system from level 10 to level 30..
Before starting make sure u set a few things.. open
inside C:\Mirserver\M2Server open !Setup.txt, press CTRL+T inside notepad and find the word rank and press search.. u should find for first the following line:
ShowRankLevelName.. make sure this is set to 1 and not to 0.. if it's set to 0 this ranking system will not work
now in the same folder open the string.ini
open it and CTRL+T and search for RankLevelName
make sure that the line which has this word in looks like this RankLevelName=%s\
now lets start making a good ranking system:
STEP 1) goto C:\Mirserver\M2Server\Envir\Market_Def and open QFunction-0.txt
this is an example code of a simply ranking system for levels 10, 20 and 30..
Description of the code:
[@levelup] is the only tag that allows to check if a player level ups or not.. so dont change this line
CHECKLEVELEX checks the level of the player
SETRANKLEVELNAME is the command that sets the ranking name.. in my examples the names are LvL10, LvL20, LvL30
SENGMSG 0 sends a message to everyone saying that the person has leveled..
in this example i used NameLists because if a player levels up to 10 and logs out he will loose his ranking.. so to make this not happen anymore we will need to edit also the QManage.txt
STEP 2) goto C:\Mirserver\M2Server\Envir\MapQuest_def and open QManage.txt
this is what i used
this code allows the server to know if the player that is logging in the game should have or not a ranking.. if he should have it, it will give it..
STEP 3) goto C:\Mirserver\M2Server\Envir\Market_Def and create a new folder called RankNames
go inside RankNames and create 3 new txt files called
lvl10.txt
lvl20.txt
lvl30.txt
If u have done everything correctly u should have a perfectly working rank system.. for more levels ovviously u will have to add them in the qfunction-0.txt making sure u dont mess up the namelists.. so for example if i want a level 40 ranking i should add in qfunction-0 this:
u should then add this in Qmanage.txt
and u should create an empty txt file called lvl40.txt inside RankNames in the Market_Def folder..
------------
STORAGE ORB
------------
What's this?
This allows the player to have the chance to put or take items from thier storage wherever they are (example of TravisW)
How to make this?
Follow the EXPERIENCE ITEMS guide to create an item with a choosen anicount and FLDIMGINDEX you prefer..
In this example i created a storage orb using anicount 200
Then open the QFunction-0.txt located inside C:\Mirserver\M2Server\Envir\Market_Def and add this code:
(@storage @getback)
%100
make sure that these 2 lines go at the very start of the QFunction.txt.. nothing must be written before this
then write this code anywhere in the qfunction
------------
SHOUTOUT ORB
------------
What's this?
This allows any player to shout out a message to all the players ingame (example of TravisW)
How to make this?
Follow the EXPERIENCE ITEMS guide to create an item with a choosen anicount and FLDIMGINDEX you prefer..
In this example i created a shoutoutorb using anicount 150
Then open the QFunction-0.txt located inside C:\Mirserver\M2Server\Envir\Market_Def and add this code:
(@@sendmsg)
%100
make sure that these 2 lines go at the very start of the QFunction.txt.. nothing must be written before this
if you have followed this guide and setted a working storage orb then u will need to add the @@sendmsg to the already existing header which will look like this:
(@@sendmsg @storage @getback)
%100
then write this code anywhere in the qfunction
------------
ROBOT SYSTEM
------------
What's this?
This function allows to make the server run some code automatically at a desired time.. in this example created by TravisW we will make it so that the server will send a message to everyone everyday at 8pm
How to make this?
STEP 1) goto C:\Mirserver\M2Server\Envir\ and open the Robot.txt and write inside it:
System eightpm
STEP 2) goto C:\Mirserver\M2Server\Envir\Robot_def and open RobotManage.txt
add this code:
STEP 3) create a txt file inside C:\Mirserver\M2Server\Envir\Robot_def called like the @command.. in this case eightpm.txt and open it.. write this code inside:
i hope i can add as much stuff as possible and keep it updated so that we can keep the forum a bit clean and nice to read..
In this first part i will be talking about:
- Experience Pots / Scrolls
- Making a Ranking System
- Storage Orb
- ShoutOut Orb
- Using Robot System
------------
EXPERIENCE ITEMS
------------
What's this?
This allows any player ingame to use an item and get for a fixed time an experience boost (Credits to a lot of people)
How to make this?
Firstly you must decide what kind of item you want to use for exp boost.. in this example i choose to use a normal scroll, just like a teleport..
OPEN the SQL SERVER Enterprise Manager.. enter in the mir2 database.. choose Tables and right click on TBL_STDITEMS and choose OPEN TABLE -> Return All Rows..
This will make you open the stditems list.. find the item u will like to use.. i will like to use for example the TownTeleport skins so i look in the list for TownTeleport and copy it's FLD_IMGINDEX.. in the tbl_stditems add a new item called:
ExpScroll with
FLD_STDMode = 31 and
FLD_SHAPE = 0
FLD_WEIGHT = 1 or whatever u prefer
FLD_Anicount = 30 or a number which we will have to remember
set all the other fields to 0 or something that you prefer
If you prefer creating an Exp Pot u simply have to follow the same steps but this time choose a FLD_IMGINDEX showing a pot instead of a scroll.. ovviously u can choose any FLD_Imgindex for this item.. doing like this u will have an item that after double clicking it will dissapear..
Now to complete it we need to go into C:\Mirserver\M2Server\Envir\Market_Def and open QFunction-0.txt
we will have to enter the following code to make one working exp item:
Code:
[@StdModeFunc30]
#act
KILLMONEXPRATE 200 1800
LineMSG 6 "Exp multiplied x2 for 1/2 An Hour"
BREAK
this code will be called when an item with anicount = 30 is double clicked..
KILLMONEXPRATE is the command that highers the exp for a decent time.. 200 = 2x and 1800 are seconds it will be active
is u wanted a 30x for 5minutes then it will be KILLMONEXPRATE 3000 300
if you want to have more than one exp scroll.. for example some for 2x.. some for 3x and rare ones for 10x etc then you will have to follow this guide again and create more than one item in the item table and give it a different name such as ExpScroll1, ExpScroll2 and so on.. remember to give different anicount values to each items like for example ExpScroll1 with anicount 30 and ExpScroll2 with anicount 31.. in the Q-Function-0.txt u will have to simple write
Code:
[@StdModeFunc30]
#act
KILLMONEXPRATE 200 3600
LineMSG 6 "Exp multiplied x2 for 1 An Hour"
BREAK
[@StdModeFunc31]
#act
KILLMONEXPRATE 300 1800
LineMSG 6 "Exp multiplied x3 for 1/2 An Hour"
BREAK
------------
RANKING SYSTEM
------------
What's this?
This allows to have players ingame with different ranking according to thier levels.. this works immediately as soon as the players level ups.. (Credits to a lot of people)
How to make this?
This is an example of a working ranking system from level 10 to level 30..
Before starting make sure u set a few things.. open
inside C:\Mirserver\M2Server open !Setup.txt, press CTRL+T inside notepad and find the word rank and press search.. u should find for first the following line:
ShowRankLevelName.. make sure this is set to 1 and not to 0.. if it's set to 0 this ranking system will not work
now in the same folder open the string.ini
open it and CTRL+T and search for RankLevelName
make sure that the line which has this word in looks like this RankLevelName=%s\
now lets start making a good ranking system:
STEP 1) goto C:\Mirserver\M2Server\Envir\Market_Def and open QFunction-0.txt
this is an example code of a simply ranking system for levels 10, 20 and 30..
Code:
[@levelUp]
#IF
CHECKLEVELEX = 10
#ACT
ADDNAMELIST RankNames\lvl10.txt
SETRANKLEVELNAME %s\LvL10
SENDMSG 0 "<$USERNAME> Has Just Leveled to 10!!"
#IF
CHECKLEVELEX = 20
#ACT
DELNAMELIST RankNames\lvl10.txt
ADDNAMELIST RankNames\lvl20.txt
SETRANKLEVELNAME %s\LvL20
SENDMSG 0 "<$USERNAME> Has Just Leveled to 20!!"
#IF
CHECKLEVELEX = 30
#ACT
give gold 500000
DELNAMELIST RankNames\lvl20.txt
ADDNAMELIST RankNames\lvl30.txt
SETRANKLEVELNAME %s\LvL30
SENDMSG 0 "<$USERNAME> Has Just Leveled to 30 and won 500K!!"
Description of the code:
[@levelup] is the only tag that allows to check if a player level ups or not.. so dont change this line
CHECKLEVELEX checks the level of the player
SETRANKLEVELNAME is the command that sets the ranking name.. in my examples the names are LvL10, LvL20, LvL30
SENGMSG 0 sends a message to everyone saying that the person has leveled..
in this example i used NameLists because if a player levels up to 10 and logs out he will loose his ranking.. so to make this not happen anymore we will need to edit also the QManage.txt
STEP 2) goto C:\Mirserver\M2Server\Envir\MapQuest_def and open QManage.txt
this is what i used
Code:
[@Login]
#IF
CHECKNAMELIST ..\Market_Def\RankNames\lvl10.txt
#ACT
SETRANKLEVELNAME %s\LvL10
BREAK
#IF
CHECKNAMELIST ..\Market_Def\RankNames\lvl20.txt
#ACT
SETRANKLEVELNAME %s\LvL20
BREAK
#IF
CHECKNAMELIST ..\Market_Def\RankNames\lvl30.txt
#ACT
SETRANKLEVELNAME %s\LvL30
BREAK
this code allows the server to know if the player that is logging in the game should have or not a ranking.. if he should have it, it will give it..
STEP 3) goto C:\Mirserver\M2Server\Envir\Market_Def and create a new folder called RankNames
go inside RankNames and create 3 new txt files called
lvl10.txt
lvl20.txt
lvl30.txt
If u have done everything correctly u should have a perfectly working rank system.. for more levels ovviously u will have to add them in the qfunction-0.txt making sure u dont mess up the namelists.. so for example if i want a level 40 ranking i should add in qfunction-0 this:
Code:
#IF
CHECKLEVELEX = 40
#ACT
give gold 1000000
DELNAMELIST RankNames\lvl30.txt
ADDNAMELIST RankNames\lvl40.txt
SETRANKLEVELNAME %s\LvL40
SENDMSG 0 "<$USERNAME> Has Just Leveled to 40 and won 1M!!"
u should then add this in Qmanage.txt
Code:
#IF
CHECKNAMELIST ..\Market_Def\RankNames\lvl40.txt
#ACT
SETRANKLEVELNAME %s\LvL40
BREAK
and u should create an empty txt file called lvl40.txt inside RankNames in the Market_Def folder..
------------
STORAGE ORB
------------
What's this?
This allows the player to have the chance to put or take items from thier storage wherever they are (example of TravisW)
How to make this?
Follow the EXPERIENCE ITEMS guide to create an item with a choosen anicount and FLDIMGINDEX you prefer..
In this example i created a storage orb using anicount 200
Then open the QFunction-0.txt located inside C:\Mirserver\M2Server\Envir\Market_Def and add this code:
(@storage @getback)
%100
make sure that these 2 lines go at the very start of the QFunction.txt.. nothing must be written before this
then write this code anywhere in the qfunction
Code:
[@StdModeFunc200]
What do you require?\
<Store items./@storage>\
<Withdrawl items./@getback>
------------
SHOUTOUT ORB
------------
What's this?
This allows any player to shout out a message to all the players ingame (example of TravisW)
How to make this?
Follow the EXPERIENCE ITEMS guide to create an item with a choosen anicount and FLDIMGINDEX you prefer..
In this example i created a shoutoutorb using anicount 150
Then open the QFunction-0.txt located inside C:\Mirserver\M2Server\Envir\Market_Def and add this code:
(@@sendmsg)
%100
make sure that these 2 lines go at the very start of the QFunction.txt.. nothing must be written before this
if you have followed this guide and setted a working storage orb then u will need to add the @@sendmsg to the already existing header which will look like this:
(@@sendmsg @storage @getback)
%100
then write this code anywhere in the qfunction
Code:
[@StdModeFunc150]
You want to make a global shout?\
<Shout/@@sendmsg>
[@@sendmsg]
#ACT
SETSENDMSGFLAG
close
------------
ROBOT SYSTEM
------------
What's this?
This function allows to make the server run some code automatically at a desired time.. in this example created by TravisW we will make it so that the server will send a message to everyone everyday at 8pm
How to make this?
STEP 1) goto C:\Mirserver\M2Server\Envir\ and open the Robot.txt and write inside it:
System eightpm
STEP 2) goto C:\Mirserver\M2Server\Envir\Robot_def and open RobotManage.txt
add this code:
Code:
[@eightpm]
#ACT
SENDMSG 3 "Its now 8pm."
break
STEP 3) create a txt file inside C:\Mirserver\M2Server\Envir\Robot_def called like the @command.. in this case eightpm.txt and open it.. write this code inside:
Code:
#AutoRun NPC RUNONDAY 20:00 @eightpm
Last edited by a moderator: