Jump to content
  • 0

Changing starting map based on variable


Yukumaru2

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  03/20/13
  • Last Seen:  

How do I change where new characters start depending on a variable? For example: A person whose name starts with a vowel starts in town X while another person whose name starts with a consonant starts in town Y?
I tried using
(#part>1)?prontera,156,191:morocc,156,93
but it didn't work.
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

Someone correct me if i am wrong. I guess this would not happen because you can only set 1 starting point on your char_athena.conf.

 

 

 
// Start point, Map name followed by coordinates (x,y)
start_point: prontera,155,185

but i guess you can change the save point by making a script that will update the save point on your database.

Edited by Patskie
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2370
  • Joined:  10/28/11
  • Last Seen:  

you mean like this ?

OnPCLoginEvent:
.@char$ = strtoupper( charat( strcharinfo(0),0 ) );
if( compare( ":A:E:I:O:U:",":"+.@char$+":" ) )
	.@map$ = "prontera";
	.@x = 155;
	.@y = 181;
}else{
	.@map$ = "prontera";
	.@x = 155;
	.@y = 171;
}
save .@map$,.@x,.@y;
warp .@map$,.@x,.@y;
end;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...