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-nmm6 (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-nmm6 (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-nmm6 (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
Elves issue
Author Message
Kyrbis
Journeyman
*

Posts: 54
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #1
Elves issue
First of all: I'm sorry if my questions cover very basics, but truly only ask if i can't find a solution myself or by help of other sources.

Since i don't want players to choos a race at character creation but in game via a basic race/class system I want to script myself (as long time first big project) i'd like to remove the possibillity to chose playing as Elf. I already know theres a memory item being created in layer 30 which declares the character as on of the elven race, but i didn't find it yet in the script pack, nor do i know (since i did not find it) what else changes it makes.

Characters can only wear elven stuff if they are elves, and my goal is to make the elven players in my future system to be able to wear the elven clothes and stuff from the script pack. but this for i have to remove the "basi" elven race or make some kind of birth chamber where everyone who chose elf gets removed this memory item and then this item being set by my system.

any hints for me where the item script is in, and at best how it would work the easiest way?
03-30-2012 07:41 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #2
RE: Elves issue
there are more than one solution for it Smile
The easiest way is that every one that create a char with the hardcoded charcreation will start in a room where you different gates. one for human and one for elven.
the gates have to be triggert.
another way is that you change your mul files /gumps so that you cannot choose the elven on the hardcoded charcreation.

your second question about the clothing.
solution 1:
you have to trigger the clothes with
on=@equiptest
and check, if his a a elven (like the body or with for example tag0.race=1 // 1 = elven

another is, that you give the elven clothing a tag like tag.race=1 and check it via an event on the char and also the equiptest trigger

you see, there are several way and I think there a more solution I wrote down here

gr

phoenix
03-30-2012 08:33 PM
Find all posts by this user Like Post Quote this message in a reply
Incanus
Apprentice
*

Posts: 2
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #3
RE: Elves issue
Take a look at the f_onchar_create function in sphere_serv_triggers.scp
You could do something like this:

Code:
// This function is called after client have created a new char.
// SRC   --> char being created
// ARGN1 --> flags
// ARGN2 --> profession chosen
// ARGN3 --> elf
// ARGS  --> account name
// ARGO  --> the client creating the character
[FUNCTION f_onchar_create]
IF <SRC.OBODY>==c_elf_male
    SRC.OBODY c_man
    SRC.BODY c_man
ELSEIF <SRC.OBODY>==c_elf_female
    SRC.OBODY c_woman
    SRC.BODY c_woman
ENDIF

There are still missing checks for hair/beard and skin color ..
03-30-2012 08:38 PM
Find all posts by this user Like Post Quote this message in a reply
Kyrbis
Journeyman
*

Posts: 54
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #4
RE: Elves issue
interesting. so the basic elven race does not use a memory item but the body if i understand it correctly?
Well then I should get this going Smile
Thanks alot
03-31-2012 02:29 AM
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)