Post Reply 
 
Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Got a couple of questions
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #1
Got a couple of questions
I forgot where the starting point for a new character is located, I tried changing sphere_map_points but it didn't do a thing.

Also, I want to put an event on every new character, i figured it was in the serv triggers but i got no luck doing that, but i probably did it wrong.

Thanks for any help
05-31-2013 06:45 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Got a couple of questions
I use the f_onchar_create function in the sphere_serv_triggers.scp file for that sort of thing.
05-31-2013 06:54 AM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #3
RE: Got a couple of questions
Yeah thats what I just tried a little harder this time and got it Tongue Thanks man
05-31-2013 07:16 AM
Find all posts by this user Like Post Quote this message in a reply
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #4
RE: Got a couple of questions
I am having a problem to start a dialog when some player create a new char!!

I don't know how to add the FUNCTION f_onchar_create.

well... I have this:
PHP Code:
// This function is called before server is going to save.
// ARGN1 --> save is forced (writable)
// ARGN2 --> save stage (for backgroud save goes 1 to 6146 [sector count + 2])
// RETURN
//      0 --> normal action (save)
//      1 --> denyes save
[FUNCTION f_onserver_save

AND THE DIALOG I WANNA START ON CREATE CHAR.

PHP Code:
[DIALOG d_cadastros]
99,51
NOCLOSE
NOMOVE
NODISPOSE
page 0
resizepic 93 52 9200 354 388
gumppic 197 70 100
text 235 84 0 0
text 218 125 0 1
gumppic 90 27 52
htmlgump 175 184 200 100 2 1 1
gumppic 102 296 2430
textentry 120 301 308 20 0 1 3
textentry 117 332 308 20 0 2 4
textentry 120 362 304 20 0 3 5
button 235 411 247 248 1 0 0

[DIALOG d_cadastros text]
Bem-Vindo
Conamidia Shard
Boa tarde
Seja bem vindo ao Conamídia ShardAqui você encontrará aventuras e diversão com outros jogadoresRespeite os jogadores assim como o servidorO intuito do servidor e proporcionar diversão a todosCaso encontre algum bugfavor contatar os responsáveis pelos servidor.

Nome Completo
E
-mail
RG

[DIALOG d_cadastros button]
ON=0
WRITEFILE cadastros
.scp Conta=<src.account>
wRITEFILE cadastros.scp NAME=<ARGTXT[1]>
WRITEFILE Cadastros.scp EMAIL=<ARGTXT[2]>
WRITEFILE Cadastros.scp RG=<ARGTXT[3]>
[
EOF

What have I got to do to make it work? I tried to add the function on the script but it didnt work.
06-06-2013 03:43 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #5
RE: Got a couple of questions
f_onchar_create should be already present in the same file of f_onserver_save !


PHP Code:
// This function is called after client have created a new char.
// SRC   --> char being created
// ARGN1 --> flags
// ARGN2 --> profession chosen
// ARGN3 --> race (1=human, 2=elf, 3=gargoyle)
// ARGS  --> account name
// ARGO  --> the client creating the character
[FUNCTION f_onchar_create]
timerf 2,src.dialog d_cadastros 
If i remember well, a delay of 1-3 seconds is needed before calling a dialog function in f_onchar_create, otherwise the gump will not appears.Actually i think it "appears" after the character creation is completed, but "disappears" when the character shows up (but i am not sure of that)
06-06-2013 04:08 AM
Find all posts by this user Like Post Quote this message in a reply
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #6
RE: Got a couple of questions
thanks man. But Actually It is not working.

If I type on admin acc .f_onchar_create it works. But when i create a New player it does not work...

I dont know
(This post was last modified: 06-06-2013 07:33 AM by larmc20.)
06-06-2013 07:20 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #7
RE: Got a couple of questions
That function runs before the character is technically in-game... Perhaps try @Login if you want to launch a dialog.
06-06-2013 08:31 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #8
RE: Got a couple of questions
(06-06-2013 07:20 AM)larmc20 Wrote:  thanks man. But Actually It is not working.

If I type on admin acc .f_onchar_create it works. But when i create a New player it does not work...

I dont know

ahh actually there is no default object in f_on_char_create (just src for the character), so you'll have to use src.timerf !
(This post was last modified: 06-06-2013 08:46 AM by darksun84.)
06-06-2013 08:42 AM
Find all posts by this user Like Post Quote this message in a reply
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #9
RE: Got a couple of questions
Yes Mate. With SRC.TIMERF 3, src.dialog.... Worked...
Thanksss
06-06-2013 12:22 PM
Find all posts by this user Like Post Quote this message in a reply
dagger4k
Journeyman
*

Posts: 194
Likes Given: 1
Likes Received: 12 in 12 posts
Joined: Mar 2012
Reputation: 0



Post: #10
RE: Got a couple of questions
For adding events to all players you can add it through the sphere.ini

Code:
// Events related to all NPCs
//EventsPet=your_event

// Events related to all players
EventsPlayer=e_player


You just have to make sure you have your e_player or e_event somewhere in your scripts. I have noticed that it doesn't show up under show events in game but it is still present on the player.

As for opening a new dialogue what you can to is add a @login function to the e_player event.
06-06-2013 05:00 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)