MPcomands

For builders to discuss and ask building questions.
Post Reply
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

MPcomands

Post by Japcil » Sun Jul 23, 2006 8:12 pm

I am trying to use two mp commands in a prog.

Code: Select all

  sayto $n Ah yes this will do nicely...
  mpoload i107329
  mpechoat $n A gnomish gem dealer gives you a red gem.
  mpechoaround $n A gnomish gem dealer give $n a red gem.
  mpgive 103729 $n
But I get this on the tport.

Code: Select all

 Log:[*****] BUG: Mpoload - Bad syntax
As far as i can tell i followed everything the lesson said on the builders pages.
Image
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Mon Jul 24, 2006 12:25 am

mpoload takes only the vnum as an argument. Thus, there should not be any "i" there.

On the other hand, mpgive takes a keyword (just like give). So, you might write "mpgive key $n" or "mpgive i433 $n". The word composed of "i" and the vnum is actually an keyword automatically added to all objects by the mud (same for "m" + vnum for the mobs). So, after a mpgive, you need a "i" if you are going to use the vnum.

As a side note, another comment on your program: In an "mpechoaround $n", you should use $N instead of $n in the text. "$n" is replaced with the name of the character; "$N" on the other hand is replaced with the name (for people who have been greeted) or with the description (for people who have not been greeted). So... if you do not want the echo to give out $n's name, you should use

Code: Select all

mpechoaround $n A gnomish gem dealer gives $N a red gem.
And... final comment, it's better to colourize your echoes. For example:

Code: Select all

mpechoat $n {B0}A gnomish gem dealer gives you a red gem.
Or, if the snippet of code is taken from a program on that gnomish gem dealer, you could use

Code: Select all

mpechoat $n $I gives you a red gem.
and $I will be replaced by the mob's short description (complete with the colour code).
Image
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Post by Japcil » Mon Jul 24, 2006 12:47 am

Dal tried in the prog with no i and it read

Code: Select all

BUG: Mpoload - Bad vnum arg
Image
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Post by Japcil » Mon Jul 24, 2006 12:49 am

Heh just realized two of the numbers were flopped in the vnum after mpoload.
Image
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Post by Japcil » Mon Jul 24, 2006 12:54 am

Now what is the mpcommand for teaching a trade skill. Mptrain didnt seem to work got a

Code: Select all

 BUG: Mptrain - Bad stat
Image
Hviti
Sword Grand Master
Sword Grand Master
Posts: 588
Joined: Fri Aug 15, 2003 7:10 pm
Location: Waterdeep

Post by Hviti » Mon Jul 24, 2006 1:24 am

http://www.forgottenkingdoms.com/builde ... sont.shtml
Builder's Lesson wrote:The command to give the character a skill point in the trade they are doing or have done the quest in is as follows:

mppractice $n 5 tradename

For example mppractice $n 5 mining will give one point in the trade and only if the PC has no more than 5 skill points in the trade already. The low number is ideal for low level quests expected to be the first quest that a PC will complete in that trade. That number will have to be raised for quests that characters can do in addition to other quests in that trade. It also depends on what kind of abilities the mobile has. If the mobile is not a master in their trade, then they should not be able to teach those are better in the skill than they are. If you want to give more than one point in the trade, then you will have to repeat the command in the program.

For a listing on available trades see the trades list. Also if you want to put a trades quest in your area you should run it past the Area Administrators FIRST.
Hope that helps.
Post Reply