The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto loot, search ground for corpse?
Author Message
Sum
Apprentice
*

Posts: 40
Likes Given: 32
Likes Received: 5 in 4 posts
Joined: Feb 2016
Reputation: 0



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
auto loot, search ground for corpse? - Sum - 02-24-2017 10:34 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)