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
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
you got issues!
my npcs spawn goofy colors

my src.level are displaying wrong on players in game




its definatly a hex / dec formula bug somewhere



build 2475


also while im at it, if you are over you maxfollowers and you buy a horse, the vendor takes your money and gives you nothing =)

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-20-2015 09:17 AM by x77x.)
10-20-2015 08:21 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: you got issues!
The weird colors are caused by the CanUse attribute and t_equiptem event. It happens that some items, when created, get a weird value in their CanUse attribute.

One of these items is the checkered shirt, an item that is almost present in every vendor NPC:
ITEM=random_shirts_human // This includes the checkered shirt

So the NPC can't equip it (notes that the item is not placed at all in the world), then if we take a look at the following line we see this:
COLOR=colors_all

For some reason (probably because it can't equip it and the item is not placed in the world), the color will be applied to the npc skin value.

So possible solutions are :
Apply the CanUse = can_use_all in the Itemdef of each item that doesn't have it, or modify/remove the t_equipitem event.
(This post was last modified: 10-20-2015 10:15 PM by darksun84.)
10-20-2015 10:10 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #3
RE: you got issues!
i have characters with SRC.LEVEL=25


SRC.NAME=<FINDLAYER(29).NAME> [SRC.LEVEL]
but in game is shows [PlayerName][19]


isnt 19 25 in hex?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-20-2015 10:47 PM by x77x.)
10-20-2015 10:46 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: you got issues!
yes it is
10-20-2015 11:35 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #5
RE: you got issues!
it worked before...

maybe now i need to eval it?

how?

Dragons of Time 2000-2020
http://dragonsoftime.com
10-21-2015 12:05 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: you got issues!
try <eval <src.level>>
10-21-2015 12:36 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #7
RE: you got issues!
IF (<eval <src.level>>==025)
SRC.NAME=<FINDLAYER(29).NAME> [25]
GUILD.ALLMEMBERS -1,SYSMESSAGE @003f <SRC.TITLE> <SRC.NAME> is online
RETURN 0

same... keeps going to the 19 one, same as above


SRC.NAME=<FINDLAYER(29).NAME> [<src.level]]

will look like PlayerName [025]

i dont want that extra 0 in there

i see whats goin on here...
all my level stuff isnt working right

im using level as decimal, but its reading in hex

anyway to get it to read LEVEL as decimal and not hex?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-21-2015 04:09 AM by x77x.)
10-21-2015 03:54 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #8
RE: you got issues!
<eval <src.level>> in the player name too, not only on the IF statement
10-21-2015 05:25 AM
Find all posts by this user Like Post Quote this message in a reply
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 


Forum Jump:


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