Jump to content
  • 0

Changing starting map based on variable


Question

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

2 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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;

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...