Jump to content

Winterfox

Members
  • Content Count

    403
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Winterfox

  1. Your example is pretty unrealistic. I highly doubt, that for the event mentioned above you will have more than 10 mobs per character. That still makes 90 per account if someone really goes up to 9 characters. But you have to consider that you can only be online with 1 character per account and only the online characters variables get saved on the update cycle. Also the quest hunting system can only cover kill x of y. The problem with that approach is, it has the opposit problem my approach has. You have to create a quest for every single mob to set it on cd if you wan't to reward for every single mob every week while in mine it would be hard to make it synchronized to get one single reward for all killed mobs. At the end it depends on what you wan't to achieve and how many trade offs you want to make performance wise for it.
  2. @@ShadowLight You could use setd and getd to atleast save yourself from using a extra var for the mob. It might require you to iterate trough all your mobs to reset the mobs to kill for one player but performance wise to have to performe that once in a while is a lot better than having more player variables that have to be constantly saved by the map server as long as the player is online. I imagine something like this could be what you are searching for: Adding of a mob to kill to the player:setd( "mob2kill" + .@mobid ), 1;Check if mob got killed etc.OnNPCKillEvent: // Get last time mob got killed. .@mob2kill = getd( "mob2kill" + killedrid ); // If the mob2kill is set and the last time the mob got killed was 7 days ago... if( .@mob2kill && ( .@mob2kill < gettimetick( 2 ) ) ) { // Hand out reward or whatever. // Save the cool down time till the mob can be killed again. setd( "mob2kill" + killedrid, gettimetick( 2 ) + 604800 ); } Removing a mob from the player:setd( "mob2kill" + .@mobid ), 0;
  3. @@guihleao Try this one: function script vip { $diasVip = getarg( 0 ); $verificaVip = getarg( 1 ); if ( getgmlevel() == 1 ) { query_sql "UPDATE `login` SET `group_id` = 1, `dt_vip` = DATE_ADD( `dt_vip`, INTERVAL " + $diasVip + " DAY ) WHERE `group_id` = 1 AND `account_id` = " + getcharid( 3 ); dispbottom "ViP estendido por mais " + $diasVip + " dias! Relogue sua personagem para ativá-lo."; } else { query_sql "UPDATE `login` SET `group_id` = 1, `dt_vip` = DATE_ADD( CURDATE(), INTERVAL " + $diasVip + " DAY ) WHERE `group_id` = 0 AND `account_id` = " + getcharid( 3 ); dispbottom "ViP inserido com sucesso! Relogue sua personagem para ativá-lo."; }}//==========================================================================================================================// Função que adiciona 15 dias Vip ao usuário//==========================================================================================================================function script vip15 { callfunc( "vip", 15, 1);}//==========================================================================================================================// Função que adiciona 30 dias Vip ao usuário//==========================================================================================================================function script vip30 { callfunc( "vip", 30, 1);}//==========================================================================================================================// Função que adiciona 45 dias Vip ao usuário//==========================================================================================================================function script vip45 { callfunc( "vip", 45, 1);}//==========================================================================================================================// Função que adiciona 60 dias Vip ao usuário//==========================================================================================================================function script vip60 { callfunc( "vip", 60, 1);}//==========================================================================================================================// Função que controla a data de término da conta vip e anúncios ao logar//==========================================================================================================================- script GerenciadorVip -1,{ OnPCLoginEvent: query_sql "UPDATE `login` SET `group_id`= 0 WHERE `group_id` = 1 AND ( `dt_vip` IS NULL OR `dt_vip` < CURDATE() )"; query_sql "SELECT ( `dt_vip` IS NULL OR `dt_vip` < CURDATE() ) FROM `login` WHERE `account_id` = " + getcharid( 3 ), @verificaVip; if ( @verificaVip ) { dispbottom "Torne-se um(a) jogador(a) ViP e tenha benefícios exclusivos!"; end; } query_sql "SELECT DATE_FORMAT( `dt_vip`, '%d/%m/%Y' ) FROM `login` WHERE `account_id` = " + getcharid( 3 ), @dataVencimento$; dispbottom "Sua conta ViP é válida até o dia " + @dataVencimento$ + ".";}
  4. @@tmav94 - script whiteList -1,{ OnWhisperGlobal: mes "Lista Atualizada"; $whiteList$ = "2000000,2000794,2000839,2000637,2000624,2000016,2004000,2003933,2003884"; mes $whiteList$; close;}function script restrictedCode { .@query_result = query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1", .@account_id); if ( .@query_result > 1 && compare( $whiteList$, getcharid(3) ) == 0 ) { mes "[WARNING]"; mes "Access Denied"; close; }}prontera,166,206,5 script Example 405,{ callfunc( "restrictedCode" ); mes "Access granted!"; close;}prontera,164,200,5 script Example2 405,{ callfunc( "restrictedCode" ); mes "Access granted!"; close;}
  5. @@rector prontera,166,207,4 script Flux Point Shop 4_M_YOUNGKNIGHT,{ openshop; end; OnInit: setarray .@itemIds,501, 502, 503; setarray .@itemPrices, 1, 1, 1; tradertype( NST_CUSTOM ); for( .@i = 0; .@i < getarraysize( .@itemIds ); .@i++ ) sellitem .@itemIds[ .@i ], .@itemPrices[ .@i ]; end; OnCountFunds: query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance; setcurrency( .@balance ); end; OnPayFunds: query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance; if( .@balance < @price ) end; query_sql "UPDATE cp_credits SET balance = balance - " + @price + " WHERE account_id = " + getcharid( 3 ); purchaseok(); end;}
  6. @@xlaws27 Call sc_end with the specific parameter before the warp. Gospel only: sc_end SC_GOSPEL; All buffs: sc_end SC_ALL;
  7. @@OverLord I think you either need a really huge playerbase to have low queue times or you will have horrendous balancing. Since nearly all systems will somehow try to predict the team strength of both teams based on individual skills and when there aren't many people the system will have a hard time to find people or it will have to adjust pretty far to end up with really imbalanced teams.
  8. @@zhaosin Put the content of that file http://www.mediafire.com/download/ymfjigxmwyz/roext.rar into your clientfolder.
  9. @@zhaosin Opensetup: http://nn.nachtwolke.com/dev/opensetup/
  10. @@OverLord Since you can call functions in any kind of scripts globally it should also work in such cases.
  11. @@OverLord There is no actual function to do this but you could create one on your own like this: function script getGuildLvl { .@res = query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" + getarg( 0 ) + "'", .@guild_lv; if( .@res ) return .@guild_lv; return 0;}
  12. @ Seems like you are out of luck. Did you try if bAddItemHealRate works if you use a SP item id? Otherwise i guess you will need to add a bAddItemSpRate manually.
  13. @ Since you don't state where i just assume you mean on your server in general. http://www.thegeekstuff.com/2010/09/change-timezone-in-linux/
  14. @@Bourbon Yeah, i just realized that edit was totally crap. It is to late for me it seems. I will look into it tomorrow.
  15. @@Bourbon Try this: http://pastebin.com/MAdNuGeY Note: I didn't test it, it's just a quick edit so it might not work or could have small quirks.
  16. @@Creek You could check if he is online before with isloggedin(<account id>) and stop execution.
  17. @@Creek You use the function rid2name, that uses the account id to get the name of the currently logged in character. If that player is logged out it will fail because the account id isn't online anymore.
  18. @@Stein The easiest way seems to be https://rathena.org/board/topic/53424-weemapcache/. But that won't fix the position of the NPCs only the walkpath.
  19. @@Creek I didn't open it, since the error was clear. It was just hard to find where the variable is used. In line 388. getmapxy(getd(".m$"+strnpcinfo(3)),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1); getd gets a reference to a variable based on a string, so you can construct the variable name dynamically. In this case getd(".m$"+strnpcinfo(3)) is the same as getd(".m$pacporing1"), so you can add the $ like this: getmapxy(getd(".m$"+strnpcinfo(3)+"$"),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
  20. yeah i think that was scam too, take a look in video, he disabled general tab chat and he take the focus on the duplicator while not showing the game screen, i wonder when the duplicating is success the obtained item message will show up or not. since you can confirm it make the same video and show what the game screen state when dupe is in proggress or after the duplicate is success Yeah, some things were pretty weird. Also this loading screen while duping that runs for some seconds is really weird. I don't think that a duping process will be so cpu intensive that is really that slow if not just for a stupid show effect.
  21. @@Creek The script function getmapxy atleast uses 4 parameters of which 3 get filled by the function to return results of the search. The first parameter is a string of the map in your case it should be named .m$pacporing1, .m$pacporing2 and .m$pacporing3 but since they omit the $ at the end of their name they are for integer variables and are not for string content which is returned by getmapxy. Therefore to work properly you need to change them to: .m$pacporing1$, .m$pacporing2$ and .m$pacporing3$.
  22. @@Creek Add the postfix $ at the end of the .m$pacporing variables.
  23. @@latheesan Looks like a scam that just takes you too a ton of surveys etc. to download a useless crap software. I think if there was a simple dupe hack tool it would be well known and fixed pretty fast. Let's see if anyone can confirm that it works, which i highly doubt.
  24. Winterfox

    NPC Help

    @@Emszy You have a } to much, this way the rest of the script can't work. prontera,98,254,5 script Bossnia 792,{ mes "[" + strnpcinfo( 1 ) + "]"; mes "Hi!~"; close; OnInit: disablenpc "Bossnia"; end; }- script BossniaManager -1,{ OnClock1500: announce "Bossnia: You wretched players.", bc_all; sleep 10000; announce "Can you face the wrath of the monsters in my map?", bc_all; sleep 10000; announce "Come inside if you dare.. *Evil laugh*", bc_all; sleep 10000; announce "A random NPC showed up in Prontera!", bc_all; enablenpc "Bossnia"; initnpctimer; end; OnTimer1800000: announce "Bossnia: 30 Minutes before the entrance closes.", bc_all; sleep 5000; announce "Bossnia: Are you all scared? Come on >:)", bc_all; end; OnTimer2400000: announce "Bossnia: 20 Minutes before the entrance closes.", bc_all; end; OnTimer3000000: announce "Bossnia: 10 Minutes before the entrance closes.", bc_all; end; OnTimer3600000: announce "Bossnia: Times up! I will summon him again tomorrow.", bc_all; disablenpc "Bossnia"; stopnpctimer; end;}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.