Sum 
Apprentice

Posts: 40
Likes Given: 32
Likes Received: 5 in 4 posts
Joined: Feb 2016
Reputation: 0
![]()
|
auto loot, search ground for corpse?
Hello all, I have a auto loot script which is working just fine. My players are asking for a command to auto loot off a corpse on the ground. I have not been able to achieve this as i use the @itemdclick for loot all and @kill for loot gold . I can't find anyway at all to search for a corpse on the ground. Is this even possible?
Here is what i have for my script now for my loot system : using version 56d nightly
Code:
/////////////Auto loot system by Admin Oric 2017 Spawn of Sosaria////////
[PLEVEL 1]
loot
[FUNCTION loot]
src.dialog=d_loot
//////////loot choice dialog//////////
[DIALOG d_loot]
100,100
PAGE 0 // Position
resizepic 50 100 2600 560 300 // Curved Grey background
gumppic 225 132 1418
dtext 200 116 0481 Loot Choice System by Admin Oric V1.0
dtext 195 150 05e7 Hail! <src.name>, Choose Your Loot System.
dtext 90 198 0ffe Loot = Gold (gold goes directly into your bag, all other looting is standard).
dtext 90 248 0ffe Loot = All (gives you a loot bag and places loot directly into your loot bag)
dtext 90 298 0ffe Loot = Normal (normal loot system)
button 72 200 2117 2118 1 0 1
button 72 250 2117 2118 1 0 2
button 72 300 2117 2118 1 0 3
[DIALOG d_loot BUTTON]
ON=0
src.sysmessage @0481 Loot choice cancelled.
ON=1
src.lootgold
ON=2
src.lootall
ON=3
src.lootnormal
////////////Normal loot system
[function lootnormal]
src.events= -e_lootall
src.events= -e_lootgold
src.events= +e_lootnormal
src.sysmessage @0481 Normal loot activated!
///////loot gold only (loots gold only and puts it in players bag)
[function lootgold] ///////loot gold only (loots gold only and puts it in players bag)
src.events= -e_lootall
src.events= +e_lootgold
src.events= -e_lootnormal
src.sysmessage @0481 Gold loot activated!
////Loots all items on the corPse when opening the corpse
[Function lootall]
IF (<src.findid.i_loot_bag>)
src.sysmessage @481 You must remove your loot bag before using this again!
return 1
ENDIF
IF !(<src.findid.i_loot_bag>)
src.events= +e_lootall
src.events= -e_lootgold
src.events= -e_lootnormal
src.newitem=i_loot_bag
src.act.bounce
src.sysmessage @0481 You have received a loot bag!
src.sysmessage @0481 All loot activated!
src.update
ENDIF
[events e_lootnormal]
ON=@ITEMDCLICK
IF (<src.act.type> == t_corpse) && !(<src.act.more2> == <src.uid>)
src.sysmessage @0481 You did not slay this monster!
return 1
ENDIF
[events e_lootall]
ON=@ITEMDCLICK
IF (<src.act.type> == t_corpse) && !(<src.act.more2> == <src.uid>)
src.sysmessage @0481 You did not slay this monster!
return 1
ENDIF
IF (<src.act.type> == t_corpse) && <rescount>
forcont <src.act.uid>
cont <src.findid.i_loot_bag>
endfor
ENDIF
IF !(<src.act.type> == t_corpse)
return 0
ENDIF
[events e_lootgold]
ON=@ITEMDCLICK
IF (<src.act.type> == t_corpse) && !(<src.act.more2> == <src.uid>)
src.sysmessage @0481 You did not slay this monster!
return 1
ENDIF
ON=@Kill
IF !(<src.act.isplayer> ==1 )
newgold <argo.gold>
argo.gold = 0
return 0
else
return 1
ENDIF
[ITEMDEF I_loot_bag]
ID=i_bag
NAME=Loot Bag
Weight=0
ON=@CREATE
COLOR=0811
[EOF]
(This post was last modified: 02-24-2017 06:19 PM by Sum.)
|
|
02-24-2017 10:34 AM |
|
|