Issues with drop

正在查看此主题的用户

Vornne 说:
Ra'Jiska 说:
I'm looking for the item drop on death & blood (for looting) on death.
See script setup_agent_for_respawn. If you just want to remove an agent (player character) without dropping items or money, use agent_fade out, which skips the hard coded weapon dropping (though you might be able to work around it by unequipping all items).

I hope it helps.
 
I have looked at the script but couldnt really figure it out thanks anyway im hoping Vornne can help me
 
glenn500 说:
I have looked at the script but couldnt really figure it out thanks anyway im hoping Vornne can help me
I won't try help people that post extremely vague questions (or "hopes"). To get a detailed, informative answer you need to ask a detailed, informative question.
 
Alright, My question is

How can i disable or bypass the drop of when a player exits the server but still leave the agent killing drop intact
 
glenn500 说:
How can i disable or bypass the drop of when a player exits the server but still leave the agent killing drop intact
The ti_on_player_exit trigger seems to be called before the ti_on_agent_killed_or_wounded one, so you could add a script to the ti_on_player_exit trigger that checked for an active agent, looped over all weapons unequipping them if found, and looped over all the slot_player_equip_* slots setting them to 0, so the agent would appear to have no items when the loot script runs; then check for an active horse agent and use agent_fade_out if so; then finally you could define and set a new player slot to indicate that the player left, which is checked in script player_drop_loot to prevent a money bag from dropping.

Very abusable to hoard items at the slightest sign of danger, but you probably know that.
 
Alright thanks ive figred out most of the armor saving


What could i use to store equipment slots in integers and send it to a url
 
glenn500 说:
What could i use to store equipment slots in integers and send it to a url
Um, agent_get_item_slot? I would have thought you would be aware of it from other parts of PW: large parts of the code depend on it. Bear in mind that for armor, the slot_player_equip_* are more reliable, since they store gloves and head armor that have been taken off using the action menu; also know that you should use val_abs on those player slots before equipping items back on an agent, since negative numbers represent default armor that should be overridden when changing troop.
 
ok well would this work aswell i have added a script to cf_save_player_exit that will get these slots than send them to a database

插入代码块:
      (player_get_slot, reg1, ":player_id", slot_player_equip_head),
      (player_get_slot, reg2, ":player_id", slot_player_equip_body),
      (player_get_slot, reg3, ":player_id", slot_player_equip_foot),
      (player_get_slot, reg4, ":player_id", slot_player_equip_gloves),
 
后退
顶部 底部