The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPCRrestock doesnt fire
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
NPCRrestock doesnt fire
Okey.... this is how desesperate im trying to make this trigger fire..

under a vendor chardef

i set this

Code:
[CHARDEF C_BLABLA]
CODE

ON=@NPCLookAtChar   // this fires fine.
serv.log hello
RESTOCK 1               // 1 is suppose to force an instant restock for the char

ON=@NPCRestock     // NOT FIREING..
Serv.log LOL

any clue ?
08-26-2014 06:17 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: NPCRrestock doesnt fire
This one is fired to create initial items on npc.
You can see it on all npc scripts.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-26-2014 06:33 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: NPCRrestock doesnt fire
so, is it possible to add a new item to the NPC Stock when restocking?

example
Code:
ON=@Whatever
//<UID> = NPC
EVENTS +e_newitemforselling
RESTOCK

[EVENTs e_newitemforselling]

ON=@NpcRestock
IF <BRAIN> = 6
SELL = i_whatever,{500,1000}
EVENTS -e_newitemforselling
ENDIF

I suppose not, because its a display selling windows, should i modify that?

SELL=
Doesnt accept LOCAL's OR Tags??????

if tag0.bardiche = i_bardiche // for example
i cannot set = <TAG0.BARDICHE>,1

Is there any way i could do that?
(This post was last modified: 08-26-2014 07:45 AM by kn4tseb.)
08-26-2014 06:49 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #4
RE: NPCRrestock doesnt fire
This is a totally weird trigger, doesnt accept conditions for sales..... example

IF <NAME> == FALSENAME // which is false
SELL = i_bardiche
ENDIF


The bardiche will be at src selling display windows nomatter if the condition is true or false >.< !!! i'm totally confused about this...
if it doesnt accept locals, or conditions or anything, it's not very usefull at all, all that can be done is set the selling and buying items to be listed..... :/

im not so sure if i can improve the "Buy" function >.<
(This post was last modified: 08-26-2014 08:31 AM by kn4tseb.)
08-26-2014 08:24 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #5
RE: NPCRrestock doesnt fire
@Buy and @Sell
You can do it with these triggers and you might want to read Skul(if I remember well) custom buy/sell system with custom values.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 08-26-2014 08:47 AM by Extreme.)
08-26-2014 08:46 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #6
RE: NPCRrestock doesnt fire
(This post was last modified: 08-26-2014 09:00 AM by kn4tseb.)
08-26-2014 08:48 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #7
RE: NPCRrestock doesnt fire
Yes, check on forum because there is a thread about it.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-26-2014 09:29 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #8
RE: NPCRrestock doesnt fire
Well i suppose this is the thread: http://forum.spherecommunity.net/Thread-...light=sell
i fallowed the instructions, changing Buy to NEW_BUY and SELL to NEW_SELL, than added the packet handling to sphere.ini
and whats next??? i ve read the thread and i cant figure whats exactly the point of this... overriding values in game?? how..
and how is this going to help me to add a <stored> item to a Vendors restock?

for now, no selling or buying gump is displayed at least for animal trainer.. could you guide me a bit?

im also getting this errors from the script:

2:46:ERROR:(sphere_system_shop_sell.scp,140)Undefined keyword 'speak'
22:46:ERROR:(sphere_system_shop_sell.scp,140)Undefined keyword 'speak'
22:46:ERROR:(sphere_system_shop_sell.scp,89)Undefined keyword 'speak'
22:46:ERROR:(sphere_system_shop_sell.scp,89)Undefined keyword 'speak'
22:46:ERROR:(sphere_system_shop_sell.scp,140)Undefined keyword 'speak'
22:46:ERROR:(sphere_system_shop_sell.scp,140)Undefined keyword 'speak'
(This post was last modified: 08-26-2014 11:45 AM by kn4tseb.)
08-26-2014 11:39 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #9
RE: NPCRrestock doesnt fire
First of all, not sure if now we can set the value of an item, but in the past we couldn't. So Skul created this system to 'override' the value of items. The tag to override the value is tag.override.value. If the item have this tag, the packet will send the overrided value to player.

I read the code and you can easily filter items to SHOW or NOT on buy/sell gump.

The 'speak' thing, change it to SAY.

Not sure what happens when buying things from animal trainer. Isn't there any error when buy/selling from animal trainer?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-26-2014 12:01 PM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #10
RE: NPCRrestock doesnt fire
No errors, but its not only the animal trainer, ill see which one dont show the gump

Seems to be only the animal trainer, tried the other ones and worked fine... if i change the NEW_SELL/BUY for sell/buy the gump appears but with the newones it doesnt.

might be something missing?? its only the animal trainer, and now i got it about whats this is meant for... will be great to manage item pricing ;D.... tho i still have this concern...

i "rewrite" stabler system based on phoenix one... i added some stuffs and after N days if the owner of a pet doesnt retrieve it the pet goes for sale... so i made some tags to link the pet with the vendor, and i tried to add it to the selling list with the ON=@NPCRestock trigger but i found out that i cannot use <locals> or <tags> to the SELL= Function
so if sell= works like sell=i_katana,1
i cant make the same with references or stored variables

IF <SRC> is the vendor the fallowing code wont work... so im trying to know if theres anyway to do this.
ON=@NPCRestock
local.item = <SRC.WEAPON>
sell=<local.item>,{1 3}

because i get
23:45:ERROR:(sphere_vendors.scp,241)Undefined symbol ''
23:45:ERROR:(sphere_vendors.scp,241)Undefined symbol 'LOCAL'
(This post was last modified: 08-26-2014 12:59 PM by kn4tseb.)
08-26-2014 12:11 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)