NPC Script Release - [Checked 06/04/2010]

smoochy boys on tour

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

Are you killing them on the right map? They need to be killed on map 0 (BW) if your using my scripts as they are. Or if you've changed it, they need to be killed on whatever map number you put in the Map Quest.

p
 

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

ρяєα¢нєя;631159 said:
Kill Count Quest
===========================================================
Then add the map quest in: Envir->MapQuest.txt
Code:
[COLOR=Red]0[/COLOR]    [101]    1    Deer    *    DeerQuest

This quest will currently only work when Deers are killed on map number 0 (Bichon Province). To change this to your desired map, edit the highlighted number in the MapQuest script. Alternativly you can add another line and change the map number, and then the script will be triggered when a deer is killed on either of the maps. Obviously you can also change which monster triggers the script by changing the monster name in the MapQuest Script, and then edditing the relivent bits in the main script.

p

That should help you out :)

p
 

forspinki

Legend
Legendary
Oct 23, 2006
3,352
80
195
Handan, China
Re: NPC Script Release

ummm lol map name seems a lil too big what do i do :P
it pushes rest away lol

doesentfit.jpg
 

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

Thats fine, it should still work. As long as your killing them on map HomeZone1.

p
 

forspinki

Legend
Legendary
Oct 23, 2006
3,352
80
195
Handan, China
Re: NPC Script Release

is this correct for the prize giving npc or do i need to keep putting #ACT for each item

[@main]
#IF
HOUR 20 21
MIN 1 3
#SAY
You need to wait around 3mins before you can access this NPC.
Exit@exit
#ELSEACT
GOTO @check


[@check]
#IF
CHECKMAPHUMANCOUNT FFA2 = 1
#ACT
GOTO @prize
#ELSESAY
You need to aliminate all the other contestants before you can
access this NPC.
Exit@exit

[@prize]
#IF
#ACT
GIVE FFAArmour(M) 1
GIVE FFARing 1
GIVE FFABrace 1
GIVE FFAHelmet 1
GIVE FFABoots 1
GIVE FFABelt 1
GIVE FFAStone 1
GIVE FFAAmulet 1
GIVE FFANecklace 1
GIVE FFASword 1
;CalcVar Human FFA + 1
;SaveVar Human FFA Integral.txt
#SAY
Congratulations! You have won today's FFA!
Exit@exit


EDIT:Nevermind tested it and it works but preacher cud u make it so once it gives you the prize it teles you out to bw so people cant just keep getin more and more kit
 
Last edited:

TravisW

LOMCN Veteran
Veteran
Sep 4, 2007
737
17
125
Re: NPC Script Release

is this correct for the prize giving npc or do i need to keep putting #ACT for each item

[@main]
#IF
HOUR 20 21
MIN 1 3
#SAY
You need to wait around 3mins before you can access this NPC.
Exit@exit
#ELSEACT
GOTO @check


[@check]
#IF
CHECKMAPHUMANCOUNT FFA2 = 1
#ACT
GOTO @prize
#ELSESAY
You need to aliminate all the other contestants before you can
access this NPC.
Exit@exit

[@prize]
#IF
#ACT
GIVE FFAArmour(M) 1
GIVE FFARing 1
GIVE FFABrace 1
GIVE FFAHelmet 1
GIVE FFABoots 1
GIVE FFABelt 1
GIVE FFAStone 1
GIVE FFAAmulet 1
GIVE FFANecklace 1
GIVE FFASword 1
Map 0 <---add that
;CalcVar Human FFA + 1
;SaveVar Human FFA Integral.txt
#SAY
Congratulations! You have won today's FFA!
Exit@exit


EDIT:Nevermind tested it and it works but preacher cud u make it so once it gives you the prize it teles you out to bw so people cant just keep getin more and more kit

Add Map 0 to randomly tele into BW, or Mapmove 0 co-ordX co-ordY. That is if your BW is still map #0 =p
 

forspinki

Legend
Legendary
Oct 23, 2006
3,352
80
195
Handan, China
Re: NPC Script Release

thanks again :) .

also any idea why its giving me 2 of each item instead of just 1 ?
 
Last edited:

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

Just add this line in when you dish out the prizes:
Code:
mapmove 0 334 266

Added it to the main script, thanks.

p
 
  • Like
Reactions: noisound

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

Evolving Boss Mob
================================================== ==========

These scripts form an Evolving Boss Mob System. The player is teleported into the KR where they face the first evolution of the boss. When they've managed to kill that a second evolution of the boss spawns instantly. This goes on up until evolution five, each time the boss getting stronger and dropping better.

Step 1: First we need to setup the boss variables upon login.
Envir->MapQuest_def->QManage.txt:
Code:
[@login]
#IF
#ACT
SET [200] 1
Var Integer Global EvoCount 0
LoadVar Global EvoCount Integral.txt

Step 2: Then we need to setup the script trigger.
Envir->MapQuest.txt:
Code:
<MapName>	[200]	1	<MobName>	*	Evolution

Step 3: Then we create the script.
Envir->MapQuest_def->Evolution.txt:
Code:
[@main]
#IF
CheckVar Global EvoCount = 0
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>1 1 0
CalcVar Global EvoCount + 1
SaveVar Global EvoCount Integral.txt
BREAK
#IF
CheckVar Global EvoCount = 1
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>2 1 0
CalcVar Global EvoCount + 1
SaveVar Global EvoCount Integral.txt
BREAK
#IF
CheckVar Global EvoCount = 2
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>3 1 0
CalcVar Global EvoCount + 1
SaveVar Global EvoCount Integral.txt
BREAK
#IF
CheckVar Global EvoCount = 3
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>4 1 0
CalcVar Global EvoCount + 1
SaveVar Global EvoCount Integral.txt
BREAK
#IF
CheckVar Global EvoCount = 4
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>5 1 0
CalcVar Global EvoCount = 0
SaveVar Global EvoCount Integral.txt
BREAK

Setp 4: Create teleport NPC.
Envir -> Market_def -> Evo-<MapName>.txt:
Code:
[@main]
#SAY
Are you ready to fight the <MobName>? He will die and rebirth 4 \
times. Each time getting stronger and dropping better! Do you \
think your up to the task <$USERNAME>? \ \
<Yes, lets go!/@move> || <Not yet/@exit>

[@move]
#IF
CheckVar Global EvoCount = 0
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName> 1 0
TIMERECALL 60
MAPMOVE <Mapname> <x> <y>
BREAK
#IF
CheckVar Global EvoCount = 1
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>1 1 0
TIMERECALL 60
MAPMOVE <Mapname> <x> <y>
BREAK
#IF
CheckVar Global EvoCount = 2
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>2 1 0
TIMERECALL 60
MAPMOVE <Mapname> <x> <y>
BREAK
#IF
CheckVar Global EvoCount = 3
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>3 1 0
TIMERECALL 60
MAPMOVE <Mapname> <x> <y>
BREAK
#IF
CheckVar Global EvoCount = 4
#ACT
CLEARMAPMON <MapName>
Param1 <MapName>
Param2 <x>
Param3 <y>
Mongen <MobName>4 1 0
TIMERECALL 60
MAPMOVE <Mapname> <x> <y>
BREAK

Step 5: Create the mob. You will need to create five different versions of the same mob in your TBL_MONSTER. They need to be named as follows:

Code:
Evolution 1: <MobName>
Evolution 2: <MobName>1
Evolution 3: <MobName>2
Evolution 4: <MobName>3
Evolution 5: <MobName>4

...Evolution 1 is the weakest evolution and Evolution 5 is the strongest, so bare that in mind when creating the mobs and remember to make the next evolution harder than the last.

Step 6: Create the drop files. The drops need to get better as the Evolution gets higher. So bare that in mind when creating the drop files and give the higher evolutions better chances of dropping than the lower ones. Also, based on how hard you've made the mob, make sure you make it drop enough pots to give them a fighting chance at the next Evolution.

I've made it so this script can be interchanged with any map and mob. To change it simply open each part in NotePad and go to Edit->Replace.... Every instance of the map/mob have the same legend so just replace them with your map/mob name:

Legend:
Code:
Map Name: <MapName>
Mob Name: <MobName>
X Coord: <x>
Y Coord: <y>

Also remember to change the map name on your teleport NPC.

Hope that helps a few people.

p
 
Last edited:

Killmaster

Legend
Legendary
Golden Oldie
Loyal Member
Nov 13, 2003
3,967
27
294
Re: NPC Script Release

Some nice stuff there. Well done.
 

Tom27

Golden Oldie
Golden Oldie
Sep 15, 2005
1,866
63
155
Norwich
Re: NPC Script Release

Dude on your evolution script,
youve told us to put the thing on [@Login],
Does that mean as soon as the user logs in they will get teleported to the challenge map straight away? Im slightly confused how it works.

So like, will i need to add anything on my teleport NPC to teleport in?
Will it recall players straight to the map as soon as they login?
etc etc
 

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
Re: NPC Script Release

no cause all hes posted in the login bit is loading variables... that doesnt do ne thing that u can physically see, its just loadin the variable used for the mob evo script lol
 

BloodDemon

Golden Oldie
Golden Oldie
Jul 20, 2003
649
19
175
Darlington, UK
Re: NPC Script Release

Dont define a global everytime some 1 logs on ur just asking for the death of ur m2server. A global is what it says it is, it only needs be defined once or your gunna get alot of spam on ur m2server. Awsum code apart from your variable management.
 

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Re: NPC Script Release

As far as i'm aware they all run without any errors and it only loads it once per person in the QManage. You need to call the Variable before you Load it other wise you will get an error, so i'm sure that's the best way to do it.

PM me the way you'd do it so i can check please? :)

p