How to create a functional object

stigmas

Dedicated Member
Dedicated Member
Jun 12, 2009
182
10
44
Spain
Hello everybody !

im using holley3.55 files, and i´d like to do a scroll or a pot that giveme something special, like double exp, or teleport to a specific area. My problem isnt to create the script or the item, is to link both (item&script).

I´ve read in a lom2 thread this :

Code:
[B]EXPERIENCE ITEMS
------------[/B]

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
but in holley there isnt Qfunction-0.txt. I think i have to use enver/Market_def/00Default.txt

In the DB there is an item called KnowItAll, is a scroll that with double click a shop appears, but in STDitems the field anicount is empty...

thankss


Saludos
 

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
Ok, basically you need to do something along these lines. This is just an example, but I used the double exp as an example. (For Double exp, you need to change the exp given for VIP in console to 2.00, If you also want to make one that gives 1.5x exp, you could alter the exp for IP in console to 1.50)
In 00Default (at the top) add a line which starts: goto @ExpPotion_ItemClick

Next, say at the bottom of 00Default.txt, add something like this:

[@ExpPotion_ItemClick]
#CALL [System\ItemScripts\ExpPotion.txt] @EventItem_ExpPotion

After that is done, you will need to go to C:\Mud3\Envir\QuestDiary\System\ and create a folder called ItemScripts. Make a .txt doc in there and call it ExpPotion.

Open the doc, and at the top put this:

[@EventItem_ExpPotion]
{
#ACT
SetItemEvent 61 19 @ExpPotion_Main ;;NOTE. The number in red is STDMode in HL_Stditems database. The number in blue is SHAPE in stditems. These numbers need to match exactly the item you have created. Also, the STDMODE and SHAPE need to be unique to each clickable item you make or they won't work.

[@ExpPotion_Main]
#IF
CHECKITEM ExpPotion 1
#ACT
TAKE ExpPotion 1
HLSCRIPTCMD SETVIPTIME 5 ;;; This is the amount of days for which the exp potion will last.
HLSCRIPTCMD SETVIPLEVEL 1;;; This can be 1 or 0 as far as I can remember.
#SAY
You Obtained 5 day-long Bonus experience.\
<Exit/@Exit>\\
}
 
Upvote 0