SphereCommunity
Elves issue - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Elves issue (/Thread-Elves-issue)



Elves issue - Kyrbis - 03-30-2012 07:41 AM

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?


RE: Elves issue - admin phoenix - 03-30-2012 08:33 PM

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


RE: Elves issue - Incanus - 03-30-2012 08:38 PM

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 ..


RE: Elves issue - Kyrbis - 03-31-2012 02:29 AM

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