Thread Rating:
		
			
				- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
 
 
	
		
			| 
					you got issues!
				 | 
		
			| Author | Message | 
		
	
	
		
	
		| Diathim  Apprentice
 
  
 Posts: 10
 Likes Given: 13
 Likes Received: 1 in 1 posts
 Joined: Oct 2015
 Reputation: -3
 
 
 
 ![]() 
 | 
			| RE: you got issues! 
 
				Changed the can_u_none return from 1 to 0 and try that. If I remember right, the can_u_none is set to a 0 value.  
Code:
 VERSION=56B// Scripted by: Khaos
 // Date: 30-11-2013
 
 [comment canuse code]
 * Attach this event to your players and simply set the flags from sphere_defs.scp from the permitteduse_flags section.
 * The flags can be set on the variable CANUSE which a character and item variable.
 * This script will perform checks on which race/sex can use the item/creature (Mount).
 * Uses the new CANUSE variable.
 
 [events e_can_use]
 on=@EquipTest
 // GMs can equip anything
 // Gargoyle GMs still cant use human/elf items and vice versa.
 if <src.isgm>
 if (<src.isgargoyle>) && !(<canuse> &can_u_gargoyle)
 return 1
 elif (<src.iself>) || (<src.ishuman>) && (<canuse> &can_u_gargoyle)
 return 1
 else
 return 0
 endif
 endif
 
 if (<canuse> &can_u_none)
 return 0
 elif (<src.ishuman>) && !(<canuse> &can_u_human)
 return 1
 elif (<src.iself>) && !(<canuse> &can_u_elf)
 return 1
 elif (<src.isgargoyle>) && !(<canuse> &can_u_gargoyle)
 return 1
 elif (<src.ismale>) && !(<canuse> &can_u_male)
 return 1
 elif (<src.isfemale>) && !(<canuse> &can_u_female)
 return 1
 endif
 
 on=@Mount
 // GM's can mount anything; unless the GM is a gargoyle.
 if <src.isgm>
 if !<src.isgargoyle>
 return 0
 else
 return 1
 endif
 endif
 
 // Gargoyles cannot mount creatures.
 if <src.isgargoyle>
 return 1
 endif
 
 if (<canuse> &can_u_none)
 return 0
 elif (<src.ishuman>) && !(<canuse> &can_u_human)
 return 1
 elif (<src.iself>) && !(<canuse> &can_u_elf)
 return 1
 elif (<src.ismale>) && !(<canuse> &can_u_male)
 return 1
 elif (<src.isfemale>) && !(<canuse> &can_u_female)
 return 1
 endif
 
 [function IsHuman]
 return <qval ((<dispid> == c_man) || (<dispid> == c_woman)) ? 1 : 0 >
 
 [function IsElf]
 return <qval ((<dispid> == c_elf_male) || (<dispid> == c_elf_female)) ? 1 : 0 >
 
 [function IsGargoyle]
 return <qval ((<dispid> == c_gargoyle_male) || (<dispid> == c_gargoyle_female)) ? 1 : 0 >
 
 [function IsMale]
 return <qval (<can> &mt_male) ? 1 : 0 >
 
 [Function IsFemale]
 return <qval (<can> &mt_female) ? 1 : 0 >
 
 [eof]
				
(This post was last modified: 10-21-2015 05:19 PM by Diathim.)
 |  | 
	| 10-21-2015 04:38 PM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	 
	
	
		
	
	
		
 
 
	 
	
	
	
| Messages In This Thread | 
| RE: you got issues! -  Diathim - 10-21-2015 04:38 PM | 
	
	
	
	
		
		
	
	
	
User(s) browsing this thread: 1 Guest(s)