Stable Master

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Postby Khalid on Thu Dec 19, 2002 6:26 am

he says nothing... he just turn around as if he were going to show you the buy window... :puppyeyes:
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Augur Wildwood on Fri Dec 20, 2002 12:15 am

First, make sure that both your "buyitems.*" and "itemsforsale.cfg" files are in the same directory/folder as the "stamaster.*" script, because that is the location where you are pointing for both the script and the config file.

Second, make sure you have completely modified the "itemsforsale.cfg" file with new entries. The entries should look something like this:

Code: Select all
item 1
{
   desc_1      a horse
   desc_2      
   objtype      0x3ea0
   graphic      0x3ea0
   price      100
   line_1      A riding mount
   line_2      
   line_3
}

item 2
{
   desc_1      a horse
   desc_2      
   objtype      0x3e9f
   graphic      0x3e9f
   price      100
   line_1      A riding mount
   line_2      
   line_3
}

item 3
{
   desc_1      a horse
   desc_2      
   objtype      0x3ea3
   graphic      0x3ea3
   price      100
   line_1      A riding mount
   line_2      
   line_3
}

item 4
{
   desc_1      a llama
   desc_2      
   objtype      0x3ea6
   graphic      0x3ea6
   price      100
   line_1      A riding mount
   line_2      
   line_3
}


...and so on - create additional entries for other mounts you want the stablemaster to sell.

Once you have all this done, recompile your scripts. restart pol and try it out.

-Augur
Augur Wildwood
Sr. Regular Poster
 
Posts: 154
Joined: Tue Oct 08, 2002 8:37 pm
Location: Berkeley, CA

Postby Khalid on Sat Dec 21, 2002 2:09 am

sorry... didn't work... well i'm almost giving up with this stuff... :cry: i hope someday to find an answer to this headache... :( thanks to all for helping me... :)
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Sat Dec 21, 2002 12:59 pm

Finally i made it work... well now it shows me the buy window and everything but when i press on buy item and the npc says "thanks come again" or something like that the horse or whatever i buy doesn't appears.. what can this be?
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Sat Dec 21, 2002 1:41 pm

well this is what the console says when it trys to create the npc

Critical script pkg/npcs/townfolk/merchants/buyitems.ecl
has run for 1001 instructions

syslog [pkg/npcs/townfolk/merchants/buyitems.ecl]: Error finding NPC template - < uninitialized object >

what can i do about this??...
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Augur Wildwood on Sat Dec 21, 2002 11:37 pm

Sounds like you might have the wrong objtype defined in your itemsforsale.cfg file for that item. I am not sure that the example I gave above has the correct object types. Do a search for each mount type to find a different objtype.

Also take a look at the Load_Ticket_Data function in the Stamaster script. This is the function that creates an animal when a person hands over a pet ticket to the stablemaster. The section in your own scripts that creates the pets for the players should look something like that function.

Just a couple ideas.

-Augur
Augur Wildwood
Sr. Regular Poster
 
Posts: 154
Joined: Tue Oct 08, 2002 8:37 pm
Location: Berkeley, CA

Postby Drocket on Sat Dec 21, 2002 11:53 pm

You have to put the npcdesc of the animal in the itemsforsale.cfg file:

item 1
{
npcdesc horse
desc_1 a horse
desc_2
objtype 0x3ea0
graphic 0x3ea0
price 100
line_1 A riding mount
line_2
line_3
}

item 2
{
npcdesc horse2
desc_1 a horse
desc_2
objtype 0x3ea0
graphic 0x3ea0
price 100
line_1 A riding mount
line_2
line_3
}

etc
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am

Postby Khalid on Sun Dec 22, 2002 2:10 am

nope... still having same problem... :cry: :puppyeyes: ... i'm starting to hate stable masters... :(
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Thu Dec 26, 2002 7:32 pm

Critical script pkg/npcs/townfolk/merchants/buyitems.ecl
has run for 1001 instructions
syslog [pkg/npcs/townfolk/merchants/buyitems.ecl]: Error finding NPC template - < uninitialized object >


well can someone help me with this... i'm still having this message... drocket do u know what can this be?.. thanks...
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Mon Dec 30, 2002 11:16 pm

Code: Select all
Critical script pkg/npcs/townfolk/merchants/buyitems.ecl has run for 1001 instructions
syslog [pkg/npcs/townfolk/merchants/buyitems.ecl]: Error finding NPC template - <uninitialized object>


well this is what the stable master says in the console... i think the problem is in this line of the buyitems script:

Code: Select all
var newpet := SpawnNPCAtLocation (chosen_item.npctemplate, shopkeep.x+1, shopkeep.y+1, "guess", player);


i said i think that there is the problem because is only line with a npctemplate instruction... hope someone can help me... thanks...

well i forgot to tell that the stable master says the "thanks, come again soon" comment but the pet doesn't appear... please someone help this is giving me a real headache...


thanks for any help...
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Thu Jan 02, 2003 3:52 am

is someone going to help me? plz i really getting a big headache with this stable master... thanks for any help...
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Augur Wildwood on Thu Jan 02, 2003 4:46 am

Unfortunately, I don't think we have enough information to tell you just where things are going wrong. You are going to have to troubleshoot this yourself.

Try using the SysLog function to find out if things are working the way you designed it to. Here is an example of a SysLog command:

Code: Select all
syslog (who.name + " made " + amount + " of " + item.desc);


You can use it to report the value of various variables you are using... or just give a step-by-step report of what parts of the script are being accessed. For example:

Code: Select all
syslog ("Starting Buyitems.ecl script");
syslog (player + " selected " + chosen_item.objtype);
syslog ("Subtracting gold from the amount in the player's pack,");
Etc.


In that way you can try a transaction and then see what the log file says actually happened in the scripts. Once you have tracked down the problem, you can remove the extra reporting code and recompile.

My best guess is that you do not have the right objtypes for the mounts in your itemsforsale.cfg file, but the best way to find out for sure is to use Syslog messages to report exactly what is happening when a player attempts to buy one.

Hope that helps,

-Augur
Augur Wildwood
Sr. Regular Poster
 
Posts: 154
Joined: Tue Oct 08, 2002 8:37 pm
Location: Berkeley, CA

Postby Khalid on Thu Jan 02, 2003 5:43 am

well now this line appears when i added one of the lines u told me to add...

Code: Select all
syslog: [pkg/npcs/townfolk/merchants/buyitems.ecl]: <appobj:MobileRef>


hope this gets usefull
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Khalid on Thu Jan 02, 2003 6:10 am

how can i get the right object type for npc's?

thanks...
Khalid
Newbie
 
Posts: 19
Joined: Sat Nov 30, 2002 1:06 am

Postby Drocket on Thu Jan 02, 2003 7:59 am

Ok, I went through and fixed some stuff for you. Because its rather long (and I hate the way the boards screw up formatting...), I zipped it up - you can download it <a href="http://www.theworldofdreams.com/files/stablemaster.zip">here</a>. To answer a couple of other question, to find out what objtype/graphic to put in for a new entry (they're pretty much the same - not much reason to have both I guess, but eh), use InsideUO. What you want are the normal item graphics - down in the 0x2100 range, there's miniture animal graphics. Those are what you want. They don't really do anything - just there to look pretty.
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am

PreviousNext

Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron