- Aug 19, 2008
- 444
- 23
- 105
NPC Script Release
Thought i'd release a few scripts that i've put together, some are ones that i've put together on my server, some are scripts i've created in the Help Section, thought i might as well release them and save other people the same problems.
Free 4 All NPC's
===========================================================
Battle Areana NPC (Starter/Mover):
Prize Giving NPC:
I've left a Variable counter in the script incase you want to keep track of how many time certain players have won, however they are currently commented out. The Variables can be useful as you can then award better prizes the more times a player wins. If you want to use the Variables you will need uncomment them (Remove the ';' before the Variable lines) and add this:
Envir->MapQuest_def->QManage.txt
The Starter/Mover NPC can be positioned on what ever map you like. The Prize giving NPC needs to be placed somewhere on FFA2.map. The maps that accompany the FFA NPC's can be found attached to this post.
Kill Count Quest
===========================================================
Quest Starter NPC:
Then add the map quest in: Envir->MapQuest.txt
Then create a new txt document: Envir->MapQuest->DeerQuest.txt
Then you need to add the below lines to: Envir->MapQuests->QManage
For this quest to work you will need to make sure you have your files setup to use Variables. Check that you have the following setup in your files: Envir->QuestDiary->Variables->Integral.txt. If not add the 'Variables' folder and then 'Integral.txt'.
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.
Dice Game NPC
===========================================================
http://www.lomcn.co.uk/forum/showpost.php?p=631181&postcount=8
This NPC uses two dice, one is assigned to the player (Left dice) the other to the NPC (Right Dice). Highest number wins! A player will bet a set stake on the chance that they will win, if they win, they recive double there original stake back, if it's a draw they recive three quaters of their original stake back, if they loose they get nothing.
Auto Exchangeable GoldBar/Bundle/Chest's
============================================================
http://www.lomcn.co.uk/forum/showpost.php?p=631491&postcount=20
This script allows you to create GoldBars, Bundles and Chests that can be exchanged to gold without visiting an NPC. To exchange them for gold simply double click them. This script still runs checks on the player bag gold to make sure they don't go over their limit.
Evolving Boss Mob
================================================== ==========
http://www.lomcn.co.uk/forum/showpost.php?p=641543&postcount=32
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.
===========================================================
NOTE: When using Variables it is more than likley you will get errors displayed on your M2Server, don't worry though this happens to everyone, the scripts still work.
p
Thought i'd release a few scripts that i've put together, some are ones that i've put together on my server, some are scripts i've created in the Help Section, thought i might as well release them and save other people the same problems.
Free 4 All NPC's
===========================================================
Battle Areana NPC (Starter/Mover):
Code:
[@main]
#IF
#ACT
;Var Integer Human FFA 0
;LoadVar Human FFA Integral.txt
#SAY
Welcome to the <$SERVERNAME> Battle Areana, please choose the event you would \
like to take part in: \ \
<FFA Tournement/@FFA> \ \
<Exit/@exit>
[@FFA]
Free for All torunements take place every Tuesday and Thursday at 8pm (GMT). The \
rules are simple, last man standing wins. Would you like to enter? \ \
<Enter tournement/@FFA1> || <Back/@main>
[@FFA1]
#IF
DAYOFWEEK TUE
#ACT
GOTO @FFA1_1
#ELSEACT
GOTO @FFATHUR
[@FFA1_1]
#IF
HOUR 19 20
#ACT
GOTO @FFA1_2
#ELSEACT
GOTO @FFATHUR
[@FFA1_2]
MIN 50 59
#ACT
GOTO @FFA2
#ELSEACT
GOTO @FFATHUR
[@FFATHUR]
#IF
DAYOFWEEK THU
#ACT
GOTO @FFA2_1
#ELSESAY
Free For All matches take place on Tuesday and Thursdays at 8pm (GMT). To sign \
up to the Free For All match visit me from 10mins before the contest begins. \ \
<Exit/@exit>
[@FFA2]
#IF
HOUR 19 20
#ACT
GOTO @FFA2_2
#ELSESAY
Free For All matches take place on Tuesday and Thursdays at 8pm (GMT). To sign \
up to the Free For All match visit me from 10mins before the contest begins. \ \
<Exit/@exit>
[@FFA2_2]
#IF
MIN 50 59
#ACT
GOTO @FFA2
#ELSESAY
Free For All matches take place on Tuesday and Thursdays at 8pm (GMT). To sign \
up to the Free For All match visit me from 10mins before the contest begins. \ \
<Exit/@exit>
[@FFA2]
#SAY
Welocme <$USERNAME>, you have decided to enter todays Free For All tournement. \
When you decied you are ready to enter the area you will be moved to a holding \
area where you will have to wait for up to 10mins for other players to join the \
match. You will then all be teleported into the contest room at roughly the same \
time and can begin the contest. Please make sure you are ready to enter the arena \
as once you are moved to the holding area there will be no way out until the end \
of the match. Are you ready? \ \
<Yes/@FFAmove> || <Not yet/@exit>
[@FFAmove]
;10min
#IF
MIN 50 51
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 540
ADDBATCH FFA2
BATCHMOVE
BREAK
;9min
#IF
MIN 51 52
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 480
ADDBATCH FFA2
BATCHMOVE
BREAK
;8min
#IF
MIN 52 53
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 420
ADDBATCH FFA2
BATCHMOVE
BREAK
;7min
#IF
MIN 53 54
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 360
ADDBATCH FFA2
BATCHMOVE
BREAK
;6min
#IF
MIN 54 55
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 300
ADDBATCH FFA2
BATCHMOVE
BREAK
;5min
#IF
MIN 55 56
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 240
ADDBATCH FFA2
BATCHMOVE
BREAK
;4min
#IF
MIN 56 57
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 180
ADDBATCH FFA2
BATCHMOVE
BREAK
;3min
#IF
MIN 57 58
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 120
ADDBATCH FFA2
BATCHMOVE
BREAK
;2min
#IF
MIN 58 59
#ACT
ADDBATCH FFA1
BATCHMOVE
BATCHDELAY 60
ADDBATCH FFA2
BATCHMOVE
BREAK
#ELSESAY
Sorry i'm afraid you have missed the entry time for todays Free For All contest \
please try again next time. \ \
<Exit/@exit>
Code:
[@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 Prize 1
mapmove 0 334 266
;CalcVar Human FFA + 1
;SaveVar Human FFA Integral.txt
#SAY
Congratulations! You have won today's FFA! \ \
<Exit/@exit>
Envir->MapQuest_def->QManage.txt
Code:
[@login]
#IF
#ACT
Var Integer Human FFA 0
LoadVar Human FFA Integral.txt
Kill Count Quest
===========================================================
Quest Starter NPC:
Code:
[@main]
#IF
CHECKNAMELIST DeerComplete1.txt
#SAY
Thanks you for you help <$USERNAME>. \ \
<Exit/@exit>
#ACT
BREAK
#IF
CHECKNAMELIST DeerComplete.txt
#SAY
Thanks you for you help <$USERNAME>. Please take this reward. \ \
<Exit/@exit>
#ACT
GIVE Prize 1
ADDNAMELIST DeerComplete1.txt
BREAK
#IF
CHECKNAMELIST DeerStart.txt
#SAY
You have killed <$Human(KillCount)>/5 Deer. Please come back \
when you have killed all five. \ \
<Exit/@exit>
#ACT
BREAK
#ELSESAY
Hi would you like to take the quest? \ \
<Yes/@accept> || <No/@exit>
[@accept]
#ACT
Var Integer Human KillCount 0
SaveVar Human KillCount Integral.txt
ADDNAMELIST DeerStart.txt
SET [101] 1
#SAY
Sweet. Come back when you've killed 5 deer. \ \
<Exit/@exit>
Code:
[COLOR=Red]0[/COLOR] [101] 1 Deer * DeerQuest
Code:
[@main]
#IF
CheckVar Human KillCount = 5
#ACT
BREAK
#IF
CheckVar Human KillCount = 4
#ACT
GOTO @finish
BREAK
#IF
CheckVar Human KillCount < 4
#ACT
CalcVar Human KillCount + 1
SaveVar Human KillCount Integral.txt
BREAK
#ELSEACT
BREAK
[@finish]
#ACT
SET [101] 0
CalcVar Human KillCount + 1
SaveVar Human KillCount Integral.txt
ADDNAMELIST DeerComplete.txt
#SAY
You have killed enough Deer to finish the quest. Return to the NPC for you \
prize. \ \
<Exit/@exit>
Code:
[@login]
#IF
#ACT
Var Integer Human KillCount 0
LoadVar Human KillCount Integral.txt
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.
Dice Game NPC
===========================================================
http://www.lomcn.co.uk/forum/showpost.php?p=631181&postcount=8
This NPC uses two dice, one is assigned to the player (Left dice) the other to the NPC (Right Dice). Highest number wins! A player will bet a set stake on the chance that they will win, if they win, they recive double there original stake back, if it's a draw they recive three quaters of their original stake back, if they loose they get nothing.
Auto Exchangeable GoldBar/Bundle/Chest's
============================================================
http://www.lomcn.co.uk/forum/showpost.php?p=631491&postcount=20
This script allows you to create GoldBars, Bundles and Chests that can be exchanged to gold without visiting an NPC. To exchange them for gold simply double click them. This script still runs checks on the player bag gold to make sure they don't go over their limit.
Evolving Boss Mob
================================================== ==========
http://www.lomcn.co.uk/forum/showpost.php?p=641543&postcount=32
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.
===========================================================
NOTE: When using Variables it is more than likley you will get errors displayed on your M2Server, don't worry though this happens to everyone, the scripts still work.
p
Attachments
Last edited: