kangfredy Posted November 8, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share 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 Link to comment Share on other sites More sharing options...
Euphy Posted November 8, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted November 8, 2012 OnPCDieEvent Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 8, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share 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 Link to comment Share on other sites More sharing options...
kangfredy Posted November 9, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Author Share Posted November 9, 2012 thanks guys but why my script doesn't auto warp?? Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 9, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted November 9, 2012 bcause you didnt add a label to be trigger upon dead...refer previous post Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 9, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted November 9, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share 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 Link to comment Share on other sites More sharing options...
kangfredy Posted November 9, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 9, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
kangfredy Posted November 15, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted November 15, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share 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 Link to comment Share on other sites More sharing options...
kangfredy Posted November 16, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.