Sample Prog Request - Renamining Spellbooks/Amulets of comm
Sample Prog Request - Renamining Spellbooks/Amulets of comm
I swore I had a sample of this somewhere but I cannot find it. Can I please have a sample of a program that takes a spellbook or amulet of communication and renames it for a fee? Such as the ones in Sune's temple in Tantras? Thank you!
- Japcil
- Sword Grand Master
- Posts: 1143
- Joined: Fri Jun 17, 2005 5:32 pm
- Location: Golden Oaks
- Contact:
You would use the vnum of the generic item ex i45 for amulet of communication and then use progs like bribe for the fee. The restringing or "renaming of the item lesson can be found here: http://www.gallwey.com/fk/builders/genericobject.php
- Japcil
- Sword Grand Master
- Posts: 1143
- Joined: Fri Jun 17, 2005 5:32 pm
- Location: Golden Oaks
- Contact:
You can use qbits to do that. First do a bribe prog:
Code: Select all
>bribe_prog 500~
if quest(0,1,$n) == 0
sayto $n Ok now give me your amulet.
mpmset $n quest 0 1 1
endif
~
>give_prog i45
if quest(0,1,$n) == 1
mpecho This mob waves their fingers over your amulet and mutters some ancient dialect.
mpecho This mob hands you back your new amulet.
mposet on $n i45 name i45 {C0}blue runed amulet
mposet on $n i45 short {C0}a blue runed amulet
mposet on $n i45 long {C0}A blue runed amulet lies forgotten here.
mposet on $n i45 ed addline 'blue runed amulet' {C0}This amulet has been infused with magical powers and is covered in blue runes.
endif
~
|
-
- Sword Grand Master
- Posts: 4708
- Joined: Tue Jul 15, 2003 9:26 pm
- Location: House of Wonder, Waterdeep
Not 100% correct, but close
First, make sure that the character has paid/done the quest/whatever. In the case of a simple payment, that would be something like this:
It sets a quest bit indicating that the character has paid.
Then, to do the renaming itself, you would use a give_prog. Amulets of communications are items vnum 45, so it would go something like this:
(I removed the "on $n", because "on $n" means that you are modifying something (an object) which is carried/held by $n; this is not the case here: the mob has the item, since $n has given it).
The renaming itself is done with those 4 mposet lines.
Name = the list of all keywords; make sure to include iVNUM in them.
Short = the short description (as in: (worn around neck) ...)
Long = the long description (as in: what you see when you enter a room and the object is on the ground)
And you have the option to add a line at the end of the item's description (you can omit that part if you don't want to change the item's description).
First, make sure that the character has paid/done the quest/whatever. In the case of a simple payment, that would be something like this:
Code: Select all
>bribe_prog 500~
if quest(0,1,$n) == 0
sayto $n Ok now give me your amulet.
mpmset $n quest 0 1 1
mpjunk all.coins
else
sayto $n You have already paid me!
sayto $n But thank you for the generous tip.
sayto $n Now, give me your amulet please.
(or the mob reimbuses $n)
endif
~
Then, to do the renaming itself, you would use a give_prog. Amulets of communications are items vnum 45, so it would go something like this:
Code: Select all
>give_prog i45
if quest(0,1,$n) == 0
sayto $n Hey! You must pay me first!
drop i45
else
mpecho This mob waves their fingers over your amulet and mutters some ancient dialect.
mpecho This mob hands you back your new amulet.
mposet i45 name i45 blue runed amulet
mposet i45 short {C0}a blue runed amulet
mposet i45 long {C0}A blue runed amulet lies forgotten here.
mposet i45 ed addline 'blue runed amulet' {C0}This amulet has been infused with magical powers and is covered in blue runes.
endif
~
The renaming itself is done with those 4 mposet lines.
Name = the list of all keywords; make sure to include iVNUM in them.
Short = the short description (as in: (worn around neck) ...)
Long = the long description (as in: what you see when you enter a room and the object is on the ground)
And you have the option to add a line at the end of the item's description (you can omit that part if you don't want to change the item's description).
Actually, both. mpdeposit won't remove the coins from the merchant, also we use the mpdeposit command judiciously on FK, so depending on the size of the bribe, it may or may not be a good idea.
"There is no safety for honest men except by believing all possible evil of evil men."
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Leftover code from Smaug. Back in the day, in its days as Smaug code, there were no coin objects on a mobile's person, or a PCs person, or anywhere really, save the ground when they were dropped or picked up, rather just a field in its file to say how much money it had, the mpdeposit command added to the economy and reduced the mobile's gold field by a like amount.
FKMud has evolved considerably past the old Smaug days. It could very well be that we could consider the mpdeposit command deprecated.
FKMud has evolved considerably past the old Smaug days. It could very well be that we could consider the mpdeposit command deprecated.
"There is no safety for honest men except by believing all possible evil of evil men."
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki