x77x
Master
Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4
|
FUNCTION f_onchar_create not working?
Code:
[FUNCTION f_onchar_create]
// This function is called before an account character got created.
// Variables:
// SRC --> Character being created
// ARGN1 --> Feature flags sent by client
// ARGN2 --> Character profession (0=Advanced, 1=Warrior, 2=Mage, 3=Blacksmith, 4=Necromancer, 5=Paladin, 6=Samurai, 7=Ninja)
// ARGN3 --> Character race (1=Human, 2=Elf, 3=Gargoyle)
// ARGS --> Account name
// ARGO --> Client creating the character
// Return:
// 0 --> Allow character creation (default action)
// 1 --> Deny character creation
//f_meditation_setup //Uncomment this line to enable passive meditation (more info on sphere_skills.scp)
SRC.Alchemy=50.0
SRC.Anatomy=50.0
SRC.AnimalLore=50.0
SRC.ItemId=50.0
SRC.ArmsLore=50.0
SRC.Parrying=50.0
SRC.Begging=50.0
SRC.Blacksmithing=50.0
SRC.Bowcraft=50.0
SRC.Peacemaking=50.0
SRC.Camping=50.0
SRC.Carpentry=50.0
SRC.Cartography=50.0
SRC.Cooking=50.0
SRC.DetectingHidden=50.0
SRC.Enticement=50.0
SRC.EvaluatingIntel=50.0
SRC.Healing=50.0
SRC.Fishing=50.0
SRC.Forensics=50.0
SRC.Herding=50.0
SRC.Hiding=50.0
SRC.Provocation=50.0
SRC.Inscription=50.0
SRC.LockPicking=50.0
SRC.Magery=50.0
SRC.MagicResistance=50.0
SRC.Tactics=50.0
SRC.Snooping=50.0
SRC.Musicianship=50.0
SRC.Poisoning=50.0
SRC.Archery=50.0
SRC.SpiritSpeak=50.0
SRC.Stealing=50.0
SRC.Tailoring=50.0
SRC.Taming=50.0
SRC.TasteId=50.0
SRC.Tinkering=50.0
SRC.Tracking=50.0
SRC.Veterinary=50.0
SRC.Swordsmanship=50.0
SRC.Macefighting=50.0
SRC.Fencing=50.0
SRC.Wrestling=50.0
SRC.Lumberjacking=50.0
SRC.Mining=50.0
SRC.Meditation=50.0
SRC.Stealth=50.0
SRC.RemoveTrap=50.0
SRC.Necromancy=0
SRC.Focus=0
SRC.Chivalry=0
SRC.Bushido=0
SRC.Ninjitsu=0
SRC.Spellweaving=0
SRC.Mysticism=0
SRC.Imbuing=0
SRC.Throwing=50.0
SRC.SPELLEFFECT 6 1
SRC.GO 5183,1167,0
SRC.EVENTS +e_players
no skills, no go, no events
Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 06-01-2017 09:35 AM by x77x.)
|
|
06-01-2017 09:34 AM |
|
The following 1 user Likes x77x's post:1 user Likes x77x's post
WRWR (06-01-2017)
|
Coruja
Sphere Developer
Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7
Dimension Shard
|
RE: FUNCTION f_onchar_create not working?
f_onchar_create is working fine here
I tested using SRC.NAME=Testing and the char got created with NAME=Testing without any problems
but set stats/skills doesn't make effect on f_onchar_create because sphere will set default stats/skills for selected profession/skills after f_onchar_create, so if you set custom values on f_onchar_create they will be replaced with default values later. So the most recommended solution is replace all these 60 lines with this simple code
Code:
[FUNCTION f_onchar_create]
...
SRC.TIMERF 1,ALLSKILLS 50.0
SRC.SPELLEFFECT s_night_sight 100.0
SRC.GO 5183,1167,0
SRC.EVENTS +e_player
PS: "SRC.EVENTS +e_player" can be replaced with "EventsPlayer=e_player" on sphere.ini
maybe when I get some free time I can take a look on the code to check if the default stats/spells can be set before f_onchar_create to avoid values being replaced later, but for now TIMERF 1 is the best solution
(This post was last modified: 06-01-2017 02:47 PM by Coruja.)
|
|
06-01-2017 02:45 PM |
|
|