I am a scripting newbie and I need some advice. I have a sewer keeper in my module who will give 15gp for each rat whisker the player gives him. The problem I am having is coming up with a script that will take all of the whiskers in theplayers inventory and give 15gp for each one. Can anyone help?
Gold for multiple items
Débuté par
Bazilbrush
, janv. 05 2011 08:03
#1
Posté 05 janvier 2011 - 08:03
#2
Posté 05 janvier 2011 - 08:28
#3
Posté 05 janvier 2011 - 08:41
Thank you for taking the trouble to reply, Lightfoot. However, I am very new to scripting and wouldn't have a clue what to do with the functions. I was rather hoping that a generous soul would write a script for me lol. Hope someone can help!
#4
Posté 06 janvier 2011 - 01:18
#include "nw_i0_plot"
const string sRatWhisker = "Replace this with the tag of the rat wiskers";
void main()
{
object oPC = GetPCSpeaker();
int nNumWhiskers = GetNumItems(oPC,sRatWhisker);
TakeNumItems(oPC,sRatWhisker,nNumWhiskers);
GiveGoldToCreature(oPC,nNumWhiskers * 15);
}
Just place you tag for the whiskers in place of the string up top.
ex.
const string sRatWhisker = "RatWhisker";
I also assumed that you wanted it wtitten for an 'Action Taken' script from a conversation node.
#5
Posté 06 janvier 2011 - 01:41
That works brilliantly, thank you so much Lightfoot.





Retour en haut






