Scripting..

Mu online season 21 - grand opening

alibaydoun

Dedicated Member
Dedicated Member
Aug 30, 2008
54
0
32
i know there are many threads but i just dontget how to write scrips, the scripts on mstations website are allready written so doesnt give me much exp.

i was looking how to place an npc somewhere- and adding a tele to cave command..not sure how to do it but i want to learn how to script in general

thanks
 

alibaydoun

Dedicated Member
Dedicated Member
Aug 30, 2008
54
0
32
still didnt work...anyway i was exploring the npcs to find out many of them sell parasword, redmoonsword,warriortube ect...how can i take these out?
 
Upvote 0

alibaydoun

Dedicated Member
Dedicated Member
Aug 30, 2008
54
0
32
every npc ingame is like this, i tried going into m2ser/envir/npc_def

but the npc's arent in there for some reason?
 
Upvote 0

Lone

LOMCN Veteran
Veteran
Mar 15, 2007
278
12
44
Sounds like a silly suggestion but it should be noted - if your changing the QFunction file you should reboot the server for the changes to take affect.

you could try it a different way if you need to move on. another way round would be to have the pet scroll as a static item a token item if you like. you could then add in a new custom command

to do this.

work your way to C:\MirServer\M2Server\Envir and then double click the CustomCommands.txt file.

in this file on a new line type

@PetScroll

Save the file and close.

if you still have the Envir folder open double click Market_Def and open the QFunction-0.txt file.

at the bottom of the file add this.

[@PetScroll]
<I want to use PetScroll1/@PetScroll1>\
<I want to use PetScroll2/@PetScroll2>\
<I want to use PetScroll3/@PetScroll3>\ \
<close/@exit>

[@PetScroll1]
#IF
CHECKITEM PetScroll 1
#ACT
TAKE PetScroll1 1
RECALLMOB Pet1
#SAY
Enjoy your Pet.
#ELSESAY
You don't have a PetScroll1.

[@PetScroll2]
#IF
CHECKITEM PetScroll2 1
#ACT
TAKE PetScroll2 1
RECALLMOB Pet2
#SAY
Enjoy your Pet.
#ELSESAY
You don't have a PetScroll2.

[@PetScroll3]
#IF
CHECKITEM PetScroll3 1
#ACT
TAKE PetScroll3 1
RECALLMOB Pet3
#SAY
Enjoy your Pet.
#ELSESAY
You don't have a PetScroll3.


Save the file and then close it - Load the server (Reboot if you had it online whilst making the changes)

and then try making a petscroll1/2/3 and try using the command by typing @PetScroll on a non gm char ;)

hope that should cover the whole process of adding the command - if you have any questions about the specifics please give me a shout and ill do my best to anwser them :)

all the best
 
Last edited:
Upvote 0

Dazz

LOMCN Veteran
Veteran
Apr 12, 2008
296
0
43
When you script aswell, there was a bug in Euro with scripts where you could click the link fast soon as the box opened and you would skip a page.. resulting to exploiting (something like that not 100% sure what it was)

This was because the scripts were like this -

[@main]
Hi Jim, how are you today?\ \
<Ok, you?/@next>

To stop this I learnt its more safe than sorry to use -

[@main]
#SAY
Hi Jim, how are you today?\ \
<Ok, you/@next>

Sorry digging up old thread ^^

/Daz
 
Upvote 0

alibaydoun

Dedicated Member
Dedicated Member
Aug 30, 2008
54
0
32
well, i just wanted the rare items out...not completely every npc lol, i wud rather go thru every npc and delete the items if this is possible, please post how =)
 
Upvote 0