![]() |
[Share] Looter
nothing special, just a looter.
Code:
class warrior_looter : warrior |
Interesting, nice.
|
thx drake)
|
someone knows the structure of the item object? ( CSharedItemData )
because if you do if item == 57 it will not work ( item is an object ) then means there should be something like item.class_id or something like that but there is no documentation about... |
Did you compile this or write it as it is now?
|
wrote manually. i don't like nasc and by manual "pseudoAsm" you can get a cleaner and more compact code...
|
u can compile it with:
[php:1:e1a31c9568]. class warrior_loot : warrior { handler: EventHandler SEE_ITEM(item) { AddGetItemDesire(item, 10); super; } } .[/php:1:e1a31c9568] to get exactly this ai.obj snippet ^^ prob is to deal with the looted items - how much items can such a looter carry - what happens with the items - only to pickup specific items etc. |
humm ..try 272
or first 40 and then 272 or 44 or first 40 and then 44 ...one of them should work ..give it a try and post results |
The items collected by the NPC are still in the database, char_id = 0 so they should be cleared with the unkown items. Just fyi.
Has anyone gotten waypoints working properly? If you could combine this with waypoints it would be infinitely more useful. |
mmmm better is with a delay, because if you are fighting with 2 or more mobs, you kill one of the mobs and the others will take your drops.
|
I was thinking of patroling guards like on retail, just that they loot too :)
|
Quote:
|
so it's not possible to obtain the loot from the npc like in other mmogs?
|
Well, the NPC doesn't actually take ownership of the items, so I'm not sure on that one >.>
|
Sorry for the double post, but where do you guys get your referances to functions etc of uncompiled AI code? Is there a post somewhere I'm overlooking?
|
most of the things i got from my decompiler project
or from ressourcetables inside nasc / server |
Would you be willing to share that info? I'm interested ^^ Haven't done much AI work, but I'm very willing to start.
|
Quote:
|
so did the numbers I said worked?
|
hmm, the pets can loot too and the items go to their inventory, there have to be a way to get the inventory ;)
|
This is how I am using it. Basically all my mobs now pickup drops not owned. You can also have the mob delete the item too simply by using the DeleteItem functions.
Code:
EventHandler SEE_ITEM(item) |
See handler GET_ITEM_FINISHED for deleting the item after the mob is done poicking it up
|
Code:
DeleteItem1(myself, item, (OwnItemCount(myself, item))); |
Here is the complete code "untested" which works on a timer to support up to 5 simutaneous items seen by the mob as well as with a 120 second delay on picking up the item. It also deletes the item after it is picked up.
Should work in theory, just needs to be tested. Waypoint code also included Code:
EventHandler SEE_ITEM(item) |
@shawnmb
lookie-lookie :D |
| All times are GMT. The time now is 23:27. |