Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by AnnieRuru

  1. 1 hour ago, danielps said:

    I just didn't understand this part when you said "warp to 0,0" FAILS", i defined a x,y to respawn in instance_db when player die, and i'm using bg_warp with defined x,y as well so i don't understand why would i have this problem.

    rathena instance script commands are ....
    well it throws error on you that you don't even understand what it actually means
    I have to read the source code to find out how rathena actually handling the instance ... duplicating map stuff

    anyway, you can check out my example script, and I think you can learn things faster from reading a sample script

     

    1 hour ago, danielps said:

    I'm kind of changing my concept about you. Nothing personal and no offense, but I think you're a bit proud.

    Exactly, in fact on the childish side too xD
    I used to make drama in the staff area ... but I guess those posts has been hidden by moderation

    and yes, you may think that way, but I've also taught a lot members how to make battleground script through PM/Skype/Discord ...
    its not that I'm discouraging you,
    but I'm just talking from experience that making battleground script needs more experience from making basic event script first, then only move upward
    in my opinion, you should try to write some simpler event script first, to build up your basic event script knowledge,
    then only tackle that harder moba style bg you spoke of

    anyway you are already in my discord friend list, its ok to ask question through discord

  2. the way you describe your post already telling you don't have any experience writing instance script before...

    anyway
     

    /* db\re\instance_db.txt
    //28,BG_PVP,0,10,bat_c01,100,95 // THIS LINE FAILS
    //28,BG_PVP,3600,10,bat_c01,100,95 // THIS LINE will automatically destroy the instance in 10 seconds
    28,BG_PVP,3600,3600,bat_c01,100,95
    */
    
    prontera,156,185,5	script	Guild VS	1_F_MARIA,{
    	.@ins = instance_create( "BG_PVP", IM_NONE );
    	if ( .@ins < 0 ) {
    		mes "failed to create instance";
    		close;
    	}
    //	instance_enter "BG_PVP"; // THIS LINE FAILS
    	instance_enter "BG_PVP", 100,95, getcharid(0), .@ins;
    	end;
    }
    bat_c01,100,95,5	script	test#2	1_F_MARIA,{
    	dispbottom strnpcinfo(4) +" test ID "+ 'test;
    	end;
    OnInstanceInit:
    	'test = instance_id();
    	end;
    }

    there seems to have 2 system that is different than hercules emulator that I am more familiar with

    1. rathena cannot set 0 timer as timeout
    if you set as 0, the map-server say "warp to 0,0" FAILS  .... doesn't make sense to me

    in hercules not only we can define the map name in whatever name we want, the IOT_NONE flag also can calculate the IdleTimeOut correctly
    rathena seems cannot do this, since IM_NONE doesn't have anyone to attach, the IdleTimeOut will behave in the same way as LimitTime

    furthermore, hercules doesn't even have instance_db.txt file to begin with

     

    2. rathena missing has_instance script command
    this script command is fairly important ... without this, I have to resort to use strnpcinfo(4) to check which map I'm in
    because IM_NONE doesn't attach to character/party/guild ... instance_id() can only search by npc

     

    but anyway this information is enough for me to write instanced battleground script for rathena

  3. 28 minutes ago, danielps said:

    Wow are u te real annie?

    hmm ? I wonder which annie are you refering too ? /hmm
    there are 7 annie in this rathena board ...

     

    2 hours ago, danielps said:

    So in original servers how does it work ?

    https://irowiki.org/wiki/Battlegrounds

     

    2 hours ago, danielps said:

    Like, there are lot of players in original server, do all of them play in the same map?

    yes, the server will queue them ....
    so if it is 6vs6 ... and 60 players register for it, you have to wait 5 rounds then only you can join

     

    2 hours ago, danielps said:

    It's impossible, so much player for same bg...

    yes I know this mechanic sux ...
    most modern MMORPG already instanced the battleground map, and players can even choose which on-going battleground to join in

     

    2 hours ago, danielps said:

    but ok i will create this bg usind isntance_create so that i program it only once and every group of players that start it will be warped to a different map and don't disturb other groups.

    yup I think you get the idea.

    btw rathena still don't support battleground queue system ... and hercules one also has some bugs ...
    so neither emulator has full features of the latest battleground queue system... yet

    • Love 1
  4. you seems to have 0 knowledge on source edits ...
    so ... spoon feed -> this patch has been tested work

     src/map/unit.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/map/unit.cpp b/src/map/unit.cpp
    index 8171fff..327db3b 100644
    --- a/src/map/unit.cpp
    +++ b/src/map/unit.cpp
    @@ -562,7 +562,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
     		ud->to_y = bl->y;
     
     		if(battle_config.official_cell_stack_limit > 0
    -			&& map_count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
    +			&& map_count_oncell(bl->m, x, y, BL_CHAR, 1) > battle_config.official_cell_stack_limit) {
     			//Walked on occupied cell, call unit_walktoxy again
     			if(ud->steptimer != INVALID_TIMER) {
     				//Execute step timer on next step instead
    

    this will make players can stand on top of ANY npc ... though
    it seems the map_count_oncell is used by several other functions, so I dare not touch it

  5. 1 hour ago, Good Fellow said:

    I just Want to know if it is possible to make the watcher's hidden while you can walk on the top of it? 

    https://github.com/HerculesWS/Hercules/issues/834
    according to kyeme in the screenshot taken from iro server, you CANNOT walk on top of FAKE_NPC sprite

    in other words, you want to make some unofficial adjustment ...

    just check the source code, seems possible
    under unit_walktoxy function inside src\map\unit.cpp ...

    	if ((flag&8) && !map_closest_freecell(bl->m, &x, &y, BL_CHAR|BL_NPC, 1)) //This might change x and y
    		return 0;
    

    just add a condition inside the map_closest_freecell function ...

  6. ok ... now I understand what you mean

    this script ... has use some ... tricks ... on it ....
    so you can't actually test the script by changing that label,
    that OnSun0000: has to be like that because it runs the calculation based on SQL command DATEDIFF

    the moment you install the script, it automatically save a the current Sunday of the current week, and it save as weekindex 0
    if you test the script that way, it will save the weekindex as -1, which will bug the script

    the proper way, like I said previously, is to change your test server's computer time into (future) current week Saturday 11:58pm and wait for it to run that label
    and remember time only move forward, it can't roll backwards, so if you change your computer time into the future, and change back original time, this script will also bug XD

    that's why I say this script has so many tricks inside
    and actually I don't even know the proper way to do this ... I've search on the internet and can't really find a perfect solution

    • Love 1
  7. found a bug,
    http://upaste.me/2d7a496551c99fca3
    - fix if the previous week has 2 or more players share the same ranking in the top10, this script will throw error when saving into `mvp_rank_archive` because of the primary key = unique key

    drop the `mvp_rank_archive` table and rebuilt it

    drop table mvp_rank_archive;

     

    @hendra814
    actually nope, the true fact is I forgotten about the mail system when I saw the claim reward in the npc menu XD
    some server actually prefer to keep their database small (periodically clean their database)
    so the rodex mail system 14 days auto-deletion is something they love

    • Upvote 3
    • Like 1
  8. 18 minutes ago, hendra814 said:

    So this script will give reward every week to the top player.

    But the player must talk to the npc to get the reward right?

    yes and yes

    don't worry, unlike the rodex mail will auto-delete in 14 days, this script using a table to store the reward infinitely ... no time limit
    can store infinite rewards too ... I have tested by change my computer date... from this month is April ...  keep debugging until July LOL

  9. @Bringer

    Problem no.1 -> Solved ~
    http://upaste.me/8d27496413111a547
    I downgrade my scripting technique to backward compatible to ... support emulator 5 years ago
    if that still giving error ... then I have to use *set script command, and that's ancient !

    Problem no.2 - nah ... that thing is client restriction
    there is nothing I can do about it, even source modification wont do
    and you DONT WANT to fix that or else your server will throw warning like players trying buy knife with 0 zeny ! ... in your map-server.exe

  10. On 2/12/2018 at 12:56 AM, pajodex said:

    // To - Do!
    //   - Convert sql table from MyISAM to InnoDB (for faster data retrieval)
    // Reference : http://herc.ws/board/topic/15845-advance-sql-commands/#comment-87378

     

    OnInit:
    	query_sql "SELECT `ENGINE` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'testest' AND TABLE_SCHEMA = DATABASE()", .@tabletype$;
    	if ( .@tabletype$ == "MyISAM" )
    		query_sql "ALTER TABLE `testest` ENGINE = InnoDB";
    	end;

    /hmm

    oh ... Reference : https://stackoverflow.com/questions/3681790/how-do-i-find-if-my-a-table-is-myisam-or-innodb

     

    EDIT- or maybe ... /heh

    OnInit:
    	query_sql "SHOW CREATE TABLE `testest`", .@tablename$, .@create_table$;
    	if ( compare( .@create_table$, "MyISAM" ) == true )
    		query_sql "ALTER TABLE `testest` ENGINE = InnoDB";
    	end;

     

    • MVP 1
  11. I've already explained this in eathena board ... yeah eathena board down ... another long explanation needed ...

     

    well don't need anymore, aleos already explained here in github

    https://github.com/rathena/rathena/issues/1949

     

    long story short, nope, even the developers are not fixing this

    so you can't setup a board near instance npc, but only on the world map that monster spawn without event labels

  12. 2.4c http://upaste.me/7c9c496344829d36f

    - fix this f*cking deny usage once again ...this time when submit a mission, the getarraysize calculation is made AFTER declare the datetime format

    - if the whole board is set to EVERYDAY, remove the player side deny usage variable completely on the next day

    @hendra814  @Radian

     

    EDIT for below: the bug has nothing to do with time limit, but only happens if the whole board set to EVERYDAY

    I couldn't reproduced the bug before because I have already set some quest in the board, until Radian told me to make another duplicate npc ...

    in a clean board ... duplicated npc where no mission has been set, then setup every quest to EVERYDAY, then I finally able to reproduce the bug

    • Upvote 1
    • Love 1
  13. 31 minutes ago, hendra814 said:

    @AnnieRuru

     

    Your new script get bugged when set time limitation for setting can do: Everyday.

    tell me how to reproduce the bug, I've tried several scenario and still unable to reproduce it

     

    [Mission Board]
    Name : Poring Hunt
    Description : test
    
    Require Mobs : 100 Poring
    
    [Limitation]
    Can do : Everyday
    BaseLevel : 130~150
    Time Limit : 15 min
    
    [Rewards]
    Zeny : 100,000

    after I submit the mission, the quest turns RED, and say that long long stuffs about deny usage

     

     

    man ... why members say my script is bug when I can't even reproduce it .... its the same as my scuffle event, I could never reproduce the bug like those 3 members said

  14. @Stolao

    I mean like .... can you guys stop spreading this kind of technique ?

    OnHour00:
    	if(gettime(DT_DAYOFWEEK) == SUNDAY){
    		query_sql("DELETE FROM `acc_reg_num` WHERE `key` = '#HReward'");
    		addrid(0);
    		#HReward = 0;
    	}
    end;

    in the `acc_reg_num` table, the `key` column isn't index

    if even as a developer is teaching this method, might as well go index the `key` column

     

    CREATE TABLE IF NOT EXISTS `acc_reg_num` (
      `account_id` int(11) unsigned NOT NULL default '0',
      `key` varchar(32) binary NOT NULL default '',
      `index` int(11) unsigned NOT NULL default '0',
      `value` int(11) NOT NULL default '0',
      PRIMARY KEY (`account_id`,`key`,`index`),
      KEY `account_id` (`account_id`),
      KEY `key` (`key`), # <-- PLEASE ADD THIS IN YOUR main.sql
    ) ENGINE=MyISAM;
    
    CREATE TABLE IF NOT EXISTS `char_reg_num` (
      `char_id` int(11) unsigned NOT NULL default '0',
      `key` varchar(32) binary NOT NULL default '',
      `index` int(11) unsigned NOT NULL default '0',
      `value` int(11) NOT NULL default '0',
      PRIMARY KEY (`char_id`,`key`,`index`),
      KEY `char_id` (`char_id`),
      KEY `key` (`key`), # <-- ALSO ADD THIS IN YOUR main.sql
    ) ENGINE=MyISAM;

     

    • Love 1
×
×
  • Create New...