kangfredy Posted November 8, 2012 Posted November 8, 2012 guys i have problem with auto warp.if some one login.it's auto warp to some where.and i will ask..if some one dead how to make auto warp in some where?? this is my script - script Race_system -1,{OnPCLoginEvent: if (strcharinfo(4) == "Hades") goto L_Hades; if (strcharinfo(4) == "Athena") goto L_Athena; if (strcharinfo(4) == "") goto L_no; L_Hades: warp "Gonryun",159,158; end; L_Athena: warp "Lighthalzen",159,90; end; L_no: warp "izlude",94,103; end; } Quote
Ryokem Posted November 8, 2012 Posted November 8, 2012 (edited) Don't forget to raise people before warping when they are dead, just not to fall into some weird bugs. OnPCDieEvent: atcommand "@raise"; if( <condition> ) warp "<map>", <x>, <y>; else if( <condition> ) warp "<map>", <x>, <y>; //[...] Edited November 8, 2012 by Ryokem 1 Quote
kangfredy Posted November 9, 2012 Author Posted November 9, 2012 thanks guys but why my script doesn't auto warp?? Quote
Emistry Posted November 9, 2012 Posted November 9, 2012 bcause you didnt add a label to be trigger upon dead...refer previous post Quote
AnnieRuru Posted November 9, 2012 Posted November 9, 2012 erm .... *strcharinfo(<type>)This function will return either the name, party name or guild name for the invoking character. Whatever it returns is determined by type. 0 - Character's name. 1 - The name of the party they're in if any. 2 - The name of the guild they're in if any. 3 - The name of the map the character is in. If a character is not a member of any party or guild, an empty string will be is there any strcharinfo(4) in the 1st place ? BUILDIN_FUNC(strcharinfo) { TBL_PC *sd; int num; struct guild* g; struct party_data* p; sd=script_rid2sd(st); if (!sd) { //Avoid crashing.... script_pushconststr(st,""); return 0; } num=script_getnum(st,2); switch(num){ case 0: script_pushstrcopy(st,sd->status.name); break; case 1: if( ( p = party_search(sd->status.party_id) ) != NULL ) { script_pushstrcopy(st,p->party.name); } else { script_pushconststr(st,""); } break; case 2: if( ( g = guild_search(sd->status.guild_id) ) != NULL ) { script_pushstrcopy(st,g->name); } else { script_pushconststr(st,""); } break; case 3: script_pushconststr(st,map[sd->bl.m].name); break; default: ShowWarning("buildin_strcharinfo: unknown parameter.\n"); script_pushconststr(st,""); break; } return 0; } shouldn't be like ... the server throw error for you ? ShowWarning("buildin_strcharinfo: unknown parameter.\n"); Quote
Emistry Posted November 9, 2012 Posted November 9, 2012 @Annie perhap he is using somekind of Faction system....like this.. http://rathena.org/board/topic/64816-beta-2-faction-system/page__hl__faction *strcharinfo(4); return faction name. Quote
kangfredy Posted November 9, 2012 Author Posted November 9, 2012 bcause you didnt add a label to be trigger upon dead...refer previous post tq emistry ...i will try again ... erm .... *strcharinfo(<type>)This function will return either the name, party name or guild name for the invoking character. Whatever it returns is determined by type. 0 - Character's name. 1 - The name of the party they're in if any. 2 - The name of the guild they're in if any. 3 - The name of the map the character is in. If a character is not a member of any party or guild, an empty string will be is there any strcharinfo(4) in the 1st place ? BUILDIN_FUNC(strcharinfo) { TBL_PC *sd; int num; struct guild* g; struct party_data* p; sd=script_rid2sd(st); if (!sd) { //Avoid crashing.... script_pushconststr(st,""); return 0; } num=script_getnum(st,2); switch(num){ case 0: script_pushstrcopy(st,sd->status.name); break; case 1: if( ( p = party_search(sd->status.party_id) ) != NULL ) { script_pushstrcopy(st,p->party.name); } else { script_pushconststr(st,""); } break; case 2: if( ( g = guild_search(sd->status.guild_id) ) != NULL ) { script_pushstrcopy(st,g->name); } else { script_pushconststr(st,""); } break; case 3: script_pushconststr(st,map[sd->bl.m].name); break; default: ShowWarning("buildin_strcharinfo: unknown parameter.\n"); script_pushconststr(st,""); break; } return 0; } shouldn't be like ... the server throw error for you ? ShowWarning("buildin_strcharinfo: unknown parameter.\n"); yep i use faction system annie.. so it's extended number 4 it's player faction.. Quote
AnnieRuru Posted November 9, 2012 Posted November 9, 2012 (edited) lol faction system so many members has tried to code it and release it in the past, all of them lost interest one after another... because our SVN is always on the update, a big modification like that sure get broken very fast I wont recommend having faction system in RO either ... usually this kind of modification is a paid job ... and need to upkeep with each SVN updates and make sure it wont break your server if you are talking about faction system respawn, you need to learn this script command *savepoint "<map name>",<x>,<y>;*save "<map name>",<x>,<y>; This command saves where the invoking character will return to upon 'return to save point', if dead or in some other cases. The two versions are equivalent. Map name, X coordinate and Y coordinate should be perfectly obvious. This ignores any and all map flags, and can make a character respawn where no teleportation is otherwise possible. savepoint "place",350,75; don't abuse OnPCDieEvent like that lol Edited November 9, 2012 by AnnieRuru 1 Quote
kangfredy Posted November 15, 2012 Author Posted November 15, 2012 tq annie sory for bump!! this is mys script use tutor from annie. - script Race_system -1,{OnPCLoginEvent: if (strcharinfo(4) == "Hades") savepoint "Gonryun",159,158; if (strcharinfo(4) == "Athena") savepoint "Lighthalzen",159,90; if (strcharinfo(4) == "") savepoint "izlude",94,103; OnPCDieEvent: atcommand "@raise"; if(strcharinfo(4) == "Hades") warp "Gonryun",159,158; if (strcharinfo (4) == "Athena") warp "Lighalzen",159,90; if (strcharinfo (4) == "") warp "Izlude",94,103; //[...] } it's correct?after test on my server it's does'nt warp..and after character die my character doesn't raise and doesn't warp? Quote
Emistry Posted November 15, 2012 Posted November 15, 2012 try this.. http://pastebin.com/raw.php?i=EMTUuRDm beside....map name are not suppose to have capital letters... for the revive process....you have to give a short delay before it run the atcommand... Quote
kangfredy Posted November 16, 2012 Author Posted November 16, 2012 try this.. http://pastebin.com/raw.php?i=EMTUuRDm beside....map name are not suppose to have capital letters... for the revive process....you have to give a short delay before it run the atcommand... ok tq emistry it's work......sorry correct for ur script it must "lighthalzen" not "lighalzen" ..thank you so much .wkwkwkwkkw Quote
Question
kangfredy
guys i have problem with auto warp.if some one login.it's auto warp to some where.and i will ask..if some one dead how to make auto warp in some where??
this is my script
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.