How to make more interesting Randomized Mob Drops

Play Now

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
94
This isnt very complex, but can add a little more fun to the menu, as far as what happens when a regular mob or a boss dies, rather then the regular drop occurring.. with money or items.. etc. Most of you older server owners probably already no this trick, so its something for newbie server owners :). We can make it a bit more complex with randomized actions using MonDie scripts. Before we start, you should make sure you are a bit accustomed to mapquest.txt, and performing basic mondie actions.

Lets start off with a simple example:
Say... we want a ZumaTaurus in ZTKR to have these randomized events occurring when the mob dies.

So first we would open our mapquest.txt

Scroll to the bottom and add this line

D1106 [0] 0 [MonDie] ZumaTaurus * [MapQuest_Def\zt_dead] [@main]

this is fairly self explanatory part, mapname, [MonDie] and then the link to the script to be executed when the monster dies.

Next we would head over to our MapQuest_Def folder thats located in QuestDiary, and create a new script called, zt_dead.txt
in that script make sure you start with @main or else the script will not trigger

now lets go over a simply randomized event for mondie script.

Code:
[@main]
#ACT
movr D0 6 ;moves a random number between 0-6 and saves it to D0
goto @chooseevent

[@chooseevent]
#IF
EQUAL D0 0
#ACT
give GoldBar

#IF
EQUAL D0 1
#ACT
Mov A0 %USERMAP
Mov A1 %USERX
Mov A2 %USERY
ForMatStr "%s,%s,%s,5" %A0 %A1 %A2
Mov A6 %A9
MonGenP %A6 MinotaurKing 1
MonGenP %A6 LeftGuard 6       ;this would spawn 7 new mobs ontop of you when ZT dies

#IF
EQUAL D0 2
#ACT
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
Inc N2 1
Inc N3 1
Inc N4 1
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
Dec N2 1
Dec N3 1
Dec N4 1
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
Dec N2 1
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
Dec N1 1
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"
Mov A0 %USERMAP
Mov A1 %USERx
Mov A2 %USERY
Mov N1 %A1
Mov N2 %A2
Mov N3 %A1
Mov N4 %A2
Inc N1 1
ForMatStr "%s,%s" %A0 %N1
Mov A3 %A9
ForMatStr "%s,%s,%s" %A3 %N2 %N3
Mov A3 %A9
Mov A8 ",+d1, +t25, +h"
ForMatStr "%s,%s,%s" %A3 %N4 %A8
Mapspell [ICEWALL] "%A9"      ;this would spawn a barrade of icewalls for 25 seconds, on and around you, when the mob dies. (thanks to chimera to initially help with this script) make sure to change the +d1 to the damage you prefer :)


#IF
EQUAL D0 3
#ACT
RepairItem 0       
RepairItem 1       
RepairItem 3       
RepairItem 8
RepairItem 4
RepairItem 5
RepairItem 6
RepairItem 7
RepairItem 10


#IF
EQUAL D0 4
#ACT
GiveExp %USERNAME 30000000

#IF
EQUAL D0 5
#SAY
etc.. etc.. can make an NPC menu here that pops up

these are a few basic ideas to start you off, you can script whatever you wish to happen :) teleport a person to another map, give them a free level, kill them, whatever hehe :)

so hopefully that gives you a basic understanding of random mondie scripts, they arent hard, and add a little more unique-ness to the server you run. you can also make the chances for these events to occur, much greater by simply increasing the initial movr from 6... to something higher. You dont need to have "EQUAL D0" for each number, if it lands on a number that doesnt have a EQUAL D0 correlated to it.. no event will occur :)
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
215
UK
#IF
EQUAL D0 0
#ACT
give GoldBar

There is a problem with this - try it when a tao pet kills it - there is no give to a pet :(

The answer to this would be a dropitemmap script I believe :)


The same may occur with GiveExp %USERNAME 30000000

Nice release.
 
Upvote 0

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
94
yes you are right mr. chimera :) i forgot about this hehe.

but i dont think you can use dropitemmap with a pet? or am i mistaken.. the command would be something like this..

Mov A0 %USERMAP
Mov A1 %USERX
Mov A2 %USERY
ForMatStr "%s,%s,%s,1" %A0 %A1 %A2
DropItemMap "%A9" Gold 1 1

but how to query a pet coord? :)
 
Last edited:
Upvote 0

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
215
UK
hmmmm not sure but I'll tell you how I did this script - I got the mob to drop an item every time then I made a random script on using the item. :)
 
Upvote 0

lewis

LOMCN Veteran
Veteran
Jan 15, 2004
327
0
43
Southampton
sorry had to edit out as i posted complete rubbish lol. Was just wondering will this also work on mir2 servers? Thanks
 
Last edited:
Upvote 0