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-nmm7 (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-nmm7 (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-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPC Restock
Author Message
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #1
NPC Restock
Dudes, me again...

Now i am re-scripting the buy/sell packet to improve some features and help players to sell training itens.
I've finished the script and it works very well, but i noticed a strange behavior happening in the layers of all vendors.

This is what my script does:

1) Override the sphere base packets (0x9e and 0x9f) to give me full control of the buy/sell system.
2) When you sell a item to the npc, this item appears to sell (stored on layer 27, vendor extra)
3) If the NPC have no money, he cant buy your itens
4) When you buy a item on the npc, the gold is set on npc's layer 29 (bankbox) increasing the money of the npc so he can buy more itens next time
5) When a player try to sell a item that is not "groupable", for exemple any weapon, it shows to sell in group.

So ok.. all this works very well, but if i leave the NPC in a area with no players, this NPC simply remove all the itens in layers: 26 (stock), layer 27 (vendor extra) and the money from layer 29 (bankbox)... WHY???

And there is nothing that i could made to make it work.

I've opened all this layers and put itens inside to try to force the buy/sell list but immediatly when i close the box, it was erased and all itens is gone....

I've copied the uid from the itens and saved the world to try to find in the save file but no one uid was saved there...

Someone pass through this before?
Thanks!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
07-19-2015 12:51 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes escribano's post
Post Reply 


Messages In This Thread
NPC Restock - escribano - 07-19-2015 12:51 PM
RE: NPC Restock - azmanomer - 07-19-2015, 04:19 PM
RE: NPC Restock - Paulo_BR - 07-20-2015, 03:59 AM
RE: NPC Restock - XuN - 07-20-2015, 05:46 PM
RE: NPC Restock - escribano - 07-21-2015, 08:01 AM
RE: NPC Restock - escribano - 07-21-2015, 09:29 AM
RE: NPC Restock - XuN - 07-22-2015, 06:14 PM
RE: NPC Restock - escribano - 07-23-2015, 12:55 AM
RE: NPC Restock - XuN - 07-24-2015, 06:47 PM
RE: NPC Restock - escribano - 07-25-2015, 04:27 PM
RE: NPC Restock - XuN - 07-27-2015, 07:40 AM
RE: NPC Restock - escribano - 07-27-2015, 12:43 PM
RE: NPC Restock - escribano - 08-01-2015, 02:36 PM

Forum Jump:


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