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






Post Reply 
 
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



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


Messages In This Thread
you got issues! - x77x - 10-20-2015, 08:21 AM
RE: you got issues! - darksun84 - 10-20-2015, 10:10 PM
RE: you got issues! - x77x - 10-20-2015, 10:46 PM
RE: you got issues! - darksun84 - 10-20-2015, 11:35 PM
RE: you got issues! - x77x - 10-21-2015, 12:05 AM
RE: you got issues! - darksun84 - 10-21-2015, 12:36 AM
RE: you got issues! - x77x - 10-21-2015, 03:54 AM
RE: you got issues! - pointhz - 10-21-2015, 05:25 AM
RE: you got issues! - Diathim - 10-21-2015 04:38 PM

Forum Jump:


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