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
Name colors and colors for pets, npc, monsters
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #1
Name colors and colors for pets, npc, monsters
I want to make a script like OSI when if you are in a guild, and have a pet, your pet become green for your and for your guildmates.
If you are blue (without guild) your pet is blue for you and for all others players...
If you are red, your pet is red for everyone...

I want to make them with the same notoriety of the owner, but I don't know how to do :/
I really don't know about memoryfindtypes.

Thanks

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-10-2012 11:33 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #2
RE: Name colors and colors for pets, npc, monsters
the criminal system, it's alot of work and working around to get that going right. I did it on my server, had to alter alot of original coding, redo the whole criminal system completely (turned it off in sphere.ini). Considering helpingacriminalisacrime had to be turned off and calling guards had to be completely rescripted. Tons of work, I'd paste my code but it's jumbled up in dozens of various scripts.

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
07-10-2012 11:46 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #3
RE: Name colors and colors for pets, npc, monsters
In Sphere.ini

// Which notoriety flags do pets inherit from their masters? (default 0)
// Set flags to indicate which notoriety statuses a pet can inherit from its owner.
// NotoGood = 0x01 // blue
// NotoGuildSame = 0x02 // green (ally)
// NotoNeutral = 0x04 // grey (can be attacked)
// NotoCriminal = 0x08 // grey (criminal)
// NotoGuildWar = 0x10 // orange (enemy guild)
// NotoEvil = 0x20 // red
// e.g. "03a" will show pets as criminal/warring/evil/allied when their master has
// one of these statuses, regardless of the pet's true notoriety.
PetsInheritNotoriety=0
07-10-2012 11:49 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Name colors and colors for pets, npc, monsters
Ok, tried with this:
PetsInheritNotoriety=01|02|04|08|010|020
Code:
ON=@Click
IF (<TAG0.NAME.HUE>)
LOCAL.COLOR=<TAG0.NAME.HUE>
ELIF ((((<REGION.FLAGS>&region_flag_guarded) || (<REGION.FLAGS>&region_flag_safe)) && ((<BODY>==c_man) || (<BODY>==c_woman) || (<ISVENDOR>))) || (<FLAGS>&statf_invul))
LOCAL.COLOR=04ac
//ELIF ((<NOTOGETFLAG <SRC>,0> == 4) || (<NOTOGETFLAG <SRC>,0> == 3) || (<NOTOGETFLAG <SRC>,0> == 6))  //criminal
ELIF ((<NOTOGETFLAG <SRC>,0> == 4) || (<NOTOGETFLAG <SRC>,0> == 3)) //criminal
LOCAL.COLOR=946
ELIF (<NOTOGETFLAG <SRC>,0> == 1)
LOCAL.COLOR=058
ELIF (<NOTOGETFLAG <SRC>,0> == 2)
LOCAL.COLOR=044
ELIF (<NOTOGETFLAG <SRC>,0> == 5)
LOCAL.COLOR=02b
ELIF (<NOTOGETFLAG <SRC>,0> == 6)
LOCAL.COLOR=026
ENDIF
LOCAL.REALNAME=<NAME>
IF (STRMATCH(* the*,<SERV.CHARDEF.<BASEID>.NAME>)) && !(STRMATCH(* the*,<NAME>))
LOCAL.REALNAME .= , <STRSUB <HVAL (StrIndexOf(<SERV.CHARDEF.<BASEID>.NAME>,the,0))> 99 <SERV.CHARDEF.<BASEID>.NAME>>
ENDIF
MESSAGE @<LOCAL.COLOR>,3,1 <LOCAL.REALNAME>
RETURN 1
The only thing that don't works is: the pet don't become blue if you are blue or red if you are red (for yourself)...
All the other suppositions are okay.

Edit: always the pet become gray for the owner, because memory_ispet always do it (probally its hardcoded)

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 07-10-2012 01:04 PM by Extreme.)
07-10-2012 12:27 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #5
RE: Name colors and colors for pets, npc, monsters
Yeah, that sounds about... I think override tags may be able to fix it but I haven't experiment.
07-10-2012 01:42 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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