Mthec

[Released] Mthec's NPCs - Crafter, Buyer, DeliveryContracts, MerchantCap, CustomTrader, ToolPurchaser, Banker, BeastSummoner

Recommended Posts

Thank you for the quick response!  I do know how to see it from the side of the person  managing the buyer.  But say I see a buyer wants concrete and I want to sell it.  Is there a way for me to know he only will buy 50 before I go out and make 200?

Share this post


Link to post
Share on other sites
3 hours ago, EmmaGrace said:

Thank you for the quick response!  I do know how to see it from the side of the person  managing the buyer.  But say I see a buyer wants concrete and I want to sell it.  Is there a way for me to know he only will buy 50 before I go out and make 200?

That's what I meant in my previous post.  Here is a screenshot I took on a second character of the Trade window.  Where it says "limit", it tells you the most they will buy.

limit.png?raw=1

Unless you mean if they have enough money to actually buy that many, then no there currently isn't a way to see that as a normal player.

Edited by Mthec

Share this post


Link to post
Share on other sites

Thank you.  I thought we had the most recent version,  but I don't see those limits and minimums on my end so I'll update and see if that fixes it. 

Share this post


Link to post
Share on other sites

[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201479642900, Name: coin, Template: coin, QL: 68.0, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201496420116, Name: coin, Template: coin, QL: 38.03503, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201529974548, Name: coin, Template: coin, QL: 18.894178, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201513197332, Name: coin, Template: coin, QL: 99.89307, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201546751764, Name: coin, Template: coin, QL: 57.41082, Rarity: 0, Tile: 2528,3346]
 

Anyone ever seen this I don't think its because of this mod but when I purchase a item from custom trader or even salesmen when the character logs out and back in the money will be returned and some times

the item purchased returns to salesmen or custom traders inventory. even with the same amount of damage it had on it from that player.
 

Share this post


Link to post
Share on other sites
1 hour ago, Aaddil said:

[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201479642900, Name: coin, Template: coin, QL: 68.0, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201496420116, Name: coin, Template: coin, QL: 38.03503, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201529974548, Name: coin, Template: coin, QL: 18.894178, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201513197332, Name: coin, Template: coin, QL: 99.89307, Rarity: 0, Tile: 2528,3346]
[02:28:16 PM] WARNING com.wurmonline.server.items.Item: Bugged item showing as banked: Item [ID: 201546751764, Name: coin, Template: coin, QL: 57.41082, Rarity: 0, Tile: 2528,3346]
 

Anyone ever seen this I don't think its because of this mod but when I purchase a item from custom trader or even salesmen when the character logs out and back in the money will be returned and some times

the item purchased returns to salesmen or custom traders inventory. even with the same amount of damage it had on it from that player.
 

Not sure what would cause that.

 

Is there any way to make it happen reliably?

Where did the coins originally come from, withdrawn at a token or from selling stuff to a trader?

 

Share this post


Link to post
Share on other sites

     There was a fix suggested to wurm ini file in tech issues that seems to have fixed that I will keep a eye on it. I do need to continue testing the custom trader. I also had a issue when the items were set to instant restock it keep adding to the lag count continuously. 

 

[10:13:12 AM] INFO com.wurmonline.server.Server: Lag detected at Zones.pollnextzones (0.5): 1.008 seconds
[10:13:12 AM] INFO com.wurmonline.server.Server: Elapsed time (1008ms) for this loop was more than 1 second so adding it to the lag count, which is now: 58

 

It seems to start building up after I add items to trader with 0 on the restock interval and when I delete them all back off trader it stops.
 

Edited by Aaddil

Share this post


Link to post
Share on other sites

CustomTrader update

Download

 

1 hour ago, Aaddil said:

I also had a issue when the items were set to instant restock it keep adding to the lag count continuously. 

Try this and see if it helps.  I'll have another look if not.

Share this post


Link to post
Share on other sites

I think that fixed it. If I have more trouble before I ask again I will try on a different server. The one I am setting up is a tad away from the normal. with only a small island that is not all sand. So not being a computer expert I might start to wonder if my map is causing it and what I was finding is coincidence.

 

Edit, Tried again and it continues, logged gm char back on and with count going destroyed custom trader and the lag counting stopped.

 

k41h3hH.jpg

 

Edited by Aaddil

Share this post


Link to post
Share on other sites

CustomTrader update

Download

 

More optimisation.

2 hours ago, Aaddil said:

I think that fixed it. If I have more trouble before I ask again I will try on a different server. The one I am setting up is a tad away from the normal. with only a small island that is not all sand. So not being a computer expert I might start to wonder if my map is causing it and what I was finding is coincidence.

 

Edit, Tried again and it continues, logged gm char back on and with count going destroyed custom trader and the lag counting stopped.

Was at a bit of a loss as to where the problem was, but I think I've found it now.  Let me know if it's still not enough.

 

Also, nice map.  Must be tough finding wood.

Share this post


Link to post
Share on other sites

I keep getting the following Error message spammed over and over to my log:

[02:46:15 PM] INFO com.wurmonline.server.MessageServer: Broadcasting Serverwide Alert: Server is currently experiencing some lag. Since last lag report 83 seconds.
[02:46:15 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:15 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:16 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:17 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:18 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:19 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:20 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:21 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:22 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:23 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:24 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:25 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:26 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:27 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:28 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

[02:46:29 PM] INFO com.wurmonline.server.creatures.Creatures: null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:144)
	at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
	at com.wurmonline.server.creatures.Creature.poll(Creature.java)
	at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
	at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
	at com.wurmonline.server.Server.run(Server.java:1911)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: com.wurmonline.server.creatures.Npc cannot be cast to com.wurmonline.server.players.Player
	at com.wurmonline.server.behaviours.MethodsItems.eat(MethodsItems.java:5411)
	at com.wurmonline.server.behaviours.ItemBehaviour.action(ItemBehaviour.java:4803)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:233)
	at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102)
	at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77)
	at com.wurmonline.server.behaviours.Action.poll(Action.java:3692)
	at com.wurmonline.server.behaviours.ActionStack.poll(ActionStack.java:247)
	at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6129)
	... 11 more

Note: this does not happen right away the server can run several hours before it will pop up the first time, then when it starts it does it repeatedly, sometimes it requires a server restart before it goes away again.  Other times it will stop on it's own.  I think the above reason is also the cause for the lag, not sure why it's trying to cast the NPC to a player.

 

PS) I am using the download from the link in this post 

 

 

Edited by Greystar

Share this post


Link to post
Share on other sites
1 hour ago, Greystar said:

I keep getting the following Error message spammed over and over to my log:

*snip*

Note: this does not happen right away the server can run several hours before it will pop up the first time, then when it starts it does it repeatedly, sometimes it requires a server restart before it goes away again.  Other times it will stop on it's own.  I think the above reason is also the cause for the lag, not sure why it's trying to cast the NPC to a player.

This isn't related to my mod.  It's only named in the logs because of a code hook.

 

The problem seems to be something to do with an AI character trying to eat an item.  Npc is not one of my classes, it's for the built-in AI players.

 

Sorry I can't be of further help.

Share this post


Link to post
Share on other sites
Just now, Mthec said:

This isn't related to my mod.  It's only named in the logs because of a code hook.

 

The problem seems to be something to do with an AI character trying to eat an item.  Npc is not one of my classes, it's for the built-in AI players.

 

Sorry I can't be of further help.

 

Odd since it ONLY happens when your mod is active.  If I disable it, it works fine.

Share this post


Link to post
Share on other sites
6 minutes ago, Greystar said:

 

Odd since it ONLY happens when your mod is active.  If I disable it, it works fine.

That is odd.  I don't do anything with the built-in AI.  I can only think the randomness of the AI behaviour means it doesn't happen all the time.

 

 

Share this post


Link to post
Share on other sites

     Thanks for your update Mthec. I am not sure if that fixed It first or me replacing my 7 year old asus did but we are good now. Yeah the map I think was just rough on older computer combined with that issue. Tested on another map and did not have same issue. The desert map I am not sure yet on just a oasis island or building little oasis areas around the water in the desert. Not sure if it will ever end up in use online but the npcs you made give us the ability to add a lot more depth to a single player map.

 

  • Like 1

Share this post


Link to post
Share on other sites

Mthec, would it be possible to request a trader that buys items at a certain price per ql? Same for enchants? And maybe a multiplier for material? 

As an example, a 60ql iron pick would be 60c.

A 60 ql iron pick with 90coc would be 1.5s.

A 60 ql steel pick would be 1.2s.

 

I would think that separate enchants would have an impact, but I'm not sure if that's doable. 

 

What do you think? Is this something that the programming would support? 

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, epel said:

Mthec, would it be possible to request a trader that buys items at a certain price per ql? Same for enchants? And maybe a multiplier for material? 

As an example, a 60ql iron pick would be 60c.

A 60 ql iron pick with 90coc would be 1.5s.

A 60 ql steel pick would be 1.2s.

 

I would think that separate enchants would have an impact, but I'm not sure if that's doable. 

 

What do you think? Is this something that the programming would support? 

The biggest problem will be getting consistent results for all items.  Sand/dirt, crops, and so on are easy to get at high ql, for example.  Picking out item types to ignore could get quite long, depending on what you are looking for.

 

 

Share this post


Link to post
Share on other sites

Personally, it'd just be for private use, so it'd be easy for me to self-govern that. But, I can see how the desire to limit it's use would be useful to the larger public. One solution could be that instead of limiting what's not viable, limiting what is, ie, only metal items. But again, I say that not knowing how wurm keeps track of it's items.

Share this post


Link to post
Share on other sites

New Mod - ToolPurchaser

Download

 

A new NPC that will buy tools and weapons according to various factors.

 

ql_price in toolpurchaser.properties sets how much per item ql.

MaterialModifiers.properties (found in the toolpurchaser mod folder) stores the multipliers for the ql price based on item material.

EnchantmentPrices.properties (again in the toolpurchaser mod folder) stores the prices for any enchantments on the item.  Spell type enchantments (CoC, WoA, etc.) are multiplied by the power of the cast, enchantments (demise spells, etc.) are a flat rate.

Both use the format id=price, see the individual files for what the ids are.

All prices are in irons (fractions will be rounded down).

 

On 11/17/2020 at 10:21 PM, epel said:

Personally, it'd just be for private use, so it'd be easy for me to self-govern that. But, I can see how the desire to limit it's use would be useful to the larger public. One solution could be that instead of limiting what's not viable, limiting what is, ie, only metal items. But again, I say that not knowing how wurm keeps track of it's items.

Hopefully I haven't made any bad assumptions, but if you want any changes just let me know.  Sorry about the name, couldn't think of anything more appropriate.  They are prefixed "Trader_" in game.

Share this post


Link to post
Share on other sites
On 11/20/2020 at 2:11 PM, Mthec said:

New Mod - ToolPurchaser

Download

 

A new NPC that will buy tools and weapons according to various factors.

 

ql_price in toolpurchaser.properties sets how much per item ql.

MaterialModifiers.properties (found in the toolpurchaser mod folder) stores the multipliers for the ql price based on item material.

EnchantmentPrices.properties (again in the toolpurchaser mod folder) stores the prices for any enchantments on the item.  Spell type enchantments (CoC, WoA, etc.) are multiplied by the power of the cast, enchantments (demise spells, etc.) are a flat rate.

Both use the format id=price, see the individual files for what the ids are.

All prices are in irons (fractions will be rounded down).

 

Hopefully I haven't made any bad assumptions, but if you want any changes just let me know.  Sorry about the name, couldn't think of anything more appropriate.  They are prefixed "Trader_" in game.

Is it possible to have an option for set amounts for enchants and material modifiers?  For example, on my server an enchanted item goes for +2s per enchant, regardless of enchant QL.  If it's steel, brass, or bronze, it costs +1s

Edited by Batta

Share this post


Link to post
Share on other sites

ToolPurchaser update

Download

 

Added new pricing options.

 

In MaterialPrices.properties, you can now add flat rate prices for specific materials.  Add entries in the format flat<id>=price.  For example, flat7=100 for a flat rate of 1c on gold items.  This can be combined with price modifiers, so you can have a flat rate for a material and multiply the price at the same time.

In EnchantmentPrices.properties, you now add a flat rate for the number of enchantments on an item using flat_rate.  You can also list enchantments you wish to be excluded from pricing altogether using ignored.  Ignore multiple enchantments by separating ids using commas.

 

All prices are in irons.

14 hours ago, Batta said:

Is it possible to have an option for set amounts for enchants and material modifiers?  For example, on my server an enchanted item goes for +2s per enchant, regardless of enchant QL.  If it's steel, brass, or bronze, it costs +1s

Done.

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Mthec said:

Done.

Wonderful!  Thank you for this.  🙂

Share this post


Link to post
Share on other sites

@Mtheca little question because the crafter

 

startskills are set to 40 and cap is 90

it shows the option (while trading) for QL 20,30 and 40

 

Will the next option (QL 50) comes if he reach the skill automaticaly?

Or will it show like ql 45, ql50....ql 80, ql 85, ql 90?

 

Thanks in advance

Eject

Edited by Eject

Share this post


Link to post
Share on other sites
4 hours ago, Eject said:

@Mtheca little question because the crafter

 

startskills are set to 40 and cap is 90

it shows the option (while trading) for QL 20,30 and 40

 

Will the next option (QL 50) comes if he reach the skill automaticaly?

Or will it show like ql 45, ql50....ql 80, ql 85, ql 90?

 

Thanks in advance

Eject

The options are generated for each trade, so they will show up automatically.  They go up in increments of 10.

 

It's been a while but I think it would be easy enough to customise the increment if you want it to go up in 5s instead.

  • Like 1

Share this post


Link to post
Share on other sites

Do i need the startskill if learning skill is off?

Or should i also set it to 90?

 

Eject

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now