| Shidhun  Journeyman
 
  
 Posts: 59
 Likes Given: 5
 Likes Received: 3 in 3 posts
 Joined: Jul 2012
 Reputation: 1
 
 
 
 ![]() 
 | 
			| Question : How to Skin an NPCs without using a bladed weapon 
 
				Hello,
 yesterday i tried to create a function (or Event) which simulates the skinning of an NPC-Monster without the use of a target.
 Sadly all my attempts where useless.
 
 It is very simple to achive this by making a Command, equipping a Memory with the right type (ex. t_weapon_sword) and giving the player a target to skin the npc.
 
 The "Problem" is, that i want to make this a racial feature without the need to target the corpse.
 
 Example :
 A Troll dies, in the Resource-List he has 5 Hides of Troll-Leather and some meat.
 When a Human Character opens the corpse, nothing happens. He still needs to use a bladed weapon to cut up the corpse, before he gets the resources.
 
 But when the char of another race (example Orcisch) opens the corpse, the corpse is getting cut (if not allready) @dclick and the cont opens. But : Without the use of a simulated Weapon and the need to target the corpse.
 
 I tried to mess around with morey/morez, playing around with the tag.blood and so on. But i don't get the right solution :
 
 Questions :
 * Is there a way you know of, how to simulate the cutting of the corpse without a real weapon. Is there some kind of sendpacket?
 * How do i find out (comparing the values) which corpse is allready cut? I tried it with messing around with the values of the corpse, but in my Worldsave there is no real difference between a cut-up-corpse and a fresh one. Sure, the tag.blood gets reduced, and morez is changed, but if i set it per script, this doesn't mean that i'm no longer able to cut up a fresh NPC
 
 Thanks in advance for every comment and (possibly) hint.
 
 Shidhun
 |  | 
	| 03-27-2014 04:29 PM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	
		| wuffel  Apprentice
 
  
 Posts: 28
 Likes Given: 0
 Likes Received: 4 in 2 posts
 Joined: Mar 2012
 Reputation: 1
 
 
 
 ![]() 
 | 
			| RE: Question : How to Skin an NPCs without using a bladed weapon 
 
				Hi    
the "timestamp" - defined on a dead body, says if the body is already carved or not. 
if timestamp = 0, than the body isnt carved yet. 
if timestamp = "old-server-time", than the body is carved.
 
you can overload the dclick/itemdclick-Trigger for example and check, if its type t_corpse etc.
			
				
(This post was last modified: 03-28-2014 11:02 AM by wuffel.)
 |  | 
	| 03-28-2014 11:01 AM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	
		| Shidhun  Journeyman
 
  
 Posts: 59
 Likes Given: 5
 Likes Received: 3 in 3 posts
 Joined: Jul 2012
 Reputation: 1
 
 
 
 ![]() 
 | 
			| RE: Question : How to Skin an NPCs without using a bladed weapon 
 
				Thanks to both of you    
A Combination of both works perfectly :
 
When the corpse is created, a timestamp is set by sphere. If it is then set to 0 (=deletion) the corpse can no longer be carved.
 
Code:
 on=@dclick                IF (<SRC.isorc>)
 if <timestamp>
 ARGS=<SERV.CHARDEF.<eval <MOREX>+<MOREY>>.RESOURCES>
 WHILE !(<isempty <ARGV[<LOCAL._WHILE>]>>)
 SERV.NEWITEM <STREAT <ARGV[<LOCAL._WHILE>]>>,<STRARG <ARGV[<LOCAL._WHILE>]>>
 NEW.CONT=<UID>
 ENDWHILE
 timestamp=0
 endif
 ENDIF
				
(This post was last modified: 03-29-2014 07:54 PM by Shidhun.)
 |  | 
	| 03-29-2014 07:53 PM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 |