• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[NPC] 7.4 NPC talking on trade channel -- NPC Trade system help

evulclown

Member
Joined
Jul 21, 2009
Messages
212
Reaction score
11
Location
under your bed
SHORT REQUEST: Would it be possible to have a 7.4 NPC "randomly" broadcast on the trade / game channel (and maybe yell)? and interact with players in person when they talk to them? If so, how? :p





LONG REASON WHY I WANT IT:
My intention is to simulate a 7.4 community trade market with NPCs. There would be a collection of 3 - 4 NPCs representing "player merchants" @ each city depot strolling around.

They'll have a randomly generated stock of items and runes to sell as well as to buy and would periodically post on the trade channel listing what they have in stock / need just like a player would have back in the 7.4 Era.

Could anyone help with this please?





HOW I INTEND TO DO THIS:


So each "NPC player" will have a stock of items for example: BP of SDs, BP UHs, BP HMMs, Dragon shield, Vampire shield etc

Each item will have its own integer stats, so:
Max Limit: The maximum of that item the NPC will ever hold.
Current stock: The amount the NPC currently has to sell.
Restock Count max: The maximum amount the NPC can generate.
Restock Period: The amount of time before the NPC attempts to generate this item and the chance of this happening.
Item Price: What the NPC will sell the item for.
Advertise: If current stock =< 1 then "yes"

An example would be:
Backpack of 20 Sudden death runes @ 1 charge each
(max limit: 15)
(current stock: 3)
(restock Count max: 0-8)
(restock period: Interval "30 minutes" chance "1/10")
(item price: 4k)
(Advertise: Yes)



Then there will be a similar thing but for demand of items. This will give the NPC a demand for certain things that they'll buy off of players.

So again, there'll be a list of fairly standard noob buying items: Crown armor, Dragon scale mail wand of inferno etc and similar to the items to be sold, the NPC will generate demand for items:

Each item will have its own integer stats, so:
Max Limit: The maximum of that item the NPC will ever demand.
Current demand: The amount the NPC currently wants.
Restock demand Count max: The maximum demand amount the NPC can generate.
Restock demand Period: The amount of time before the NPC attempts to generate this item and the chance of this happening.
Item Price: What the NPC will buy the item for.
Advertise: If current demand =< 1 then "yes"


An example would be:
Dragon shield
(max limit: 1)
(current demand: 0)
(Restock demand Count max: 0-1)
(Restock demand Period: Interval "60 minutes" chance "2/10")
(item price: 4.5k)
(Advertise: No)




The NPC will then formulate a advertising text based on its current stock integer for each item it's demanding and selling. And then will send its message on to trade chat (maybe) yell. Or if a player talks to the NPC and asks what they're buying / selling.

So an example would be:
Message interval: 10 minutes. Chance: 3/10
Message "I'm selling: 3x BP Sudden death (4k), 2x BP Heavy Magic Missile (1k), 1x Giant Sword (20k), 10x BP Ultimate healing (2k). I'm buying: 1x Dragon shield (4.5k), 1x Wand of Inferno (4k), 3x Might ring (1k). THAIS only! No noob scammers!"




Any help with this would be massively appreciated! :):)
 
Last edited:
Back
Top