Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by AnnieRuru

  1. 1 hour ago, Tokei said:
    • A player can do multiple auto announces.
    • There is no way of tracking the active announcements.
    • Once the auto announce is bought, it is fully detached from the player and cannot be linked back to him.
    • The announces will get lost on script reload/server reboots. You'd probably want to use global arrays and have the announces displayed with a OnTimer1000 checks instead.

     

    yes originally I was also thinking about storing it on SQL table or using a $PERMANENT_GLOBAL_ARRAY so can GM can track which announcement are still being queue
    or deny the same player from using auto-broadcast over and over,
    but somehow I went for the easier route and do things that is easier to be made ... probably because he didn't pay me to do it so I made it easy hahaha

    initnpctimer and sleep doesn't persist after server reboots, I think the only way is use OnMinute00: OnMinute03: ... OnMinute57: ... ?

    • Love 1
  2. interesting script, but low readability

    		if ( .@cond_ofthemonth ) {
    			.@count += .reward_month;
    			login_reward = login_reward + pow( 2,30 );
    			.@montly_message$ = " and " + .reward_month +" coin for being online a month";
    		}

    if I understood this correctly, this means... if I being online everyday for 2 months
    on 1st month, no problem
    but on 2nd month, login += pow(2,30) again and will cause integer overflow

    I think just use a simple daily login script like Poring King provided earlier ... if its bug, anyone can fix it easily,
    not like this one using confusing bitmask where it doesn't actually saving in bits ...

  3. On 10/21/2020 at 11:44 AM, JinYuichi said:

    I tested this grf only has 35 cloth color
    no additional body style on 3rd job (arch bishop) or doram(Job_Summoner)

    few days ago I saw a topic on script release that has additional job sprite like 4th job and jro sprite ...
    I downloaded that before it was taken down, but I couldn't get it to work either

    retry again ..... I just unpack this grf using grf editor ....
    first thing I noticed is ... yes changing the bodystyle needs to reset cloth color to 0

    2nd thing is ... bodystyle number 2 only has 1 cloth color which value at 0, anything above it will client crash


    ok after talked with Zell, he answered a lot

    1. is human race and doram race separate hairstyle and haircolor ?
    yes

    2. is the additional bodystyle based on basejob ? eg: rune knight, rune knight T and baby rune knight share same bodystyle number ...
    no
    knight and lord knight is separate
    rune knight, rune knight T and baby rune knight DOES share the same ...
    .... gravity logic

    3. if having addition bodystyle, means also need to add palettes too right ? because if it doesn't, means my script needs each bodystyle has custom cloth range
    yes
    however you should fix that yourself by adding additional palette to your custom bodystyle number

    • MVP 1
  4. HAHAHAHAHAHA !!!

    ok you must have learn from my scripts, but strnpcinfo(NPC_NAME_HIDDEN)is HERCULES only constant
    in rathena, because NPC_NAME_HIDDEN isn't declare as constant number 2, it becomes 0, means strnpcinfo(0) = the full name of the npc

    //== AGIT Manager ==========================================
    prtg_cas01,197,197,0	duplicate(Gld_Agit_Manager)	Agit#prtg_cas01	FAKE_NPC

     

    change strnpcinfo(NPC_NAME_HIDDEN) into strnpcinfo(2), because you are using rathena, not hercules

     


    ok some more pointing

    query_sql "SELECT `castle_name` FROM `agit_defend_stats`",.@castle_ranks$;
    
    	if( !getarraysize(.@castle_ranks$) ){

    just do

    	query_sql "SELECT COUNT(1) FROM `agit_defend_stats`, .@count;
    	if (!.@count)

    if  I remember correctly, our query_sql doesn't have a row limit on how much it can fetch ...
    so if this having a large table, executing this line can cause server to lag

     

    SELECT `defend_time`,`guild_id`,`woe_ended` FROM `agit_defend_stats` WHERE `castle_name`='" + .@castleName$ + "' ORDER BY `defend_time` DESC LIMIT 10

    index the `castle_name` and `defend_time` column

    • MVP 1
  5. well yes its actually better to create table with phpmyadmin
    why use OnInit and access query_sql everytime ? query_sql is a slow operation (a simple line is fine but if having multiple lines you'll start notice the lag)

    anyway, I don't recommend using OnInit, but here's the answer

    -	script	jsdfksfj	1_F_MARIA,{
    OnInit:
    	.@query$ = "CREATE TABLE IF NOT EXISTS `blah` ("
    	         +   "`id` INT AUTO_INCREMENT PRIMARY KEY,"
    	         +   "`points` INT,"
    	         +   "`breaktimestamp` DATETIME,"
    	         +   "KEY(`points`)"
    	         + ") ENGINE = InnoDB;";
    	query_sql .@query$;
    }

    by the way I didn't see your table is index properly
    anything that has SELECT <something> FROM `table` WHERE `column` ... this `column` has to be index

  6. @Mael oh that, players can enable the command and bring it into the map ...

    OnStart:
    	if (!getstatus(SC_BERSERK) && !getstatus(SC_SATURDAYNIGHTFEVER) && !getstatus(SC_GRAVITATION) &&
    	    !getstatus(SC_TRICKDEAD) && !getstatus(SC_HIDING) && !getstatus(SC__SHADOWFORM) && !getstatus(SC__INVISIBILITY) &&
    	    !getstatus(SC__MANHOLE) && !getstatus(SC_KAGEHUMI) && !getstatus(SC_HEAT_BARREL_AFTER) &&
    		!getstatus(SC_STONE) && !getstatus(SC_FREEZE) && !getstatus(SC_STUN) && !getstatus(SC_SLEEP) &&
    		!getmapflag(strcharinfo(3), MF_BATTLEGROUND) && !getmapflag(strcharinfo(3), MF_PVP) && !getmapflag(strcharinfo(3), MF_GVG))
    		{

    its more like replacing with this condition, so it doesn't trigger with mapflags

  7. 11 hours ago, Bringer said:

    another version for boss card to boss card

    open another topic, you always seems to asking questions on another person's topic and mess up the conversation
    same goes to this -> https://rathena.org/board/topic/126009-deadbloody-branch-timer/?do=findComment&comment=386976
    I'll ignore all your post on this forum from now on if you don't open a new topic, I'm backseat moderating atm
    I don't have moderation power on rathena forum,

     

     

    4 hours ago, DrakeSky said:

    Like if I want to remove poring card on the list I will put 4001 something like that. 

    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/choose3card_1randomcard/choose3card_1randomcard_0.2r.txt

  8. if you mean my old script from 2013, yeah I have learned things since then
    in fact anything I made before 2015 should be scrap

    I've seen your script collection release topic, you should be able to handle this kind of modification ....
    this is script support section after all ... no spoon feed

    and ? which part you don't understand ?

     

    5 hours ago, Poring King said:

    Get the last guild from the recently woe winners and give +(MorePoints)

    just add the ON DUPLICATE KEY UPDATE statement inside OnAgitBreak label of woe script

    • Upvote 1
  9. I don't recommend alter a column from official table

    Spoiler

    just write for fun, but please don't do it
     

    
    -	script	kjhksjhf	FAKE_NPC,{
    OnInit:
    	if (!query_sql("SHOW COLUMNS FROM `guild` WHERE `Field` = 'woe_points'", .@fields, .@a, .@b, .@c, .@d, .@e))
    		query_sql "ALTER TABLE `guild` ADD COLUMN `woe_points` INT DEFAULT 0 AFTER `skill_point`, ADD INDEX(`woe_points`)";
    	end;
    }

     

    honestly just create a new table

    CREATE TABLE `guild_woe_points` (
    	`guild_id` INT PRIMARY KEY,
    	`guild_name` VARCHAR(23),
    	`woe_points` INT,
    	KEY(`woe_points`)
    ) ENGINE = InnoDB;

    then just

    query_sql "INSERT INTO `guild_woe_points` VALUES ("+ getcharid(2) +", '"+ escape_sql(strcharinfo(2)) +"', 1) ON DUPLICATE KEY UPDATE `woe_points` = `woe_points` +1;

  10. 17 hours ago, Almond Snicker said:

    but would there be something like you can see how much is left for you to buy

    dynamic shop can show in dispbottom, but it isn't real time
    for example, 2 players access to the same shop at the same time, if 1 player buy out all available stocks, the other player will still see it as having stock available
    only if that other player trying to buy something then npc will tell ya out of stock

    means RO actually doesn't have a system for item shop with limited stock, we just emulate it with custom variables

    17 hours ago, Almond Snicker said:

    and easier to script to work with

    marketshop can accept item ID, not zeny

    17 hours ago, Almond Snicker said:

    on dynamic shop it looks like you need to replicate every script for each item you will be selling isn't that right

    don't understand what this sentence means

    • Love 1
  11. wow !! who actually write out this formula, marvelous !!
    me wanna give credits to whoever can write this formula out

    anyways, all you have to do is just add an SQL query for it

    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/choose3card_1randomcard/choose3card_1randomcard_0.1r.txt

     

    EDIT: found out ->

    https://rathena.org/board/topic/124490-3-cards-of-your-choice-1-random-card/?do=findComment&comment=381238

  12. 1 hour ago, fzxree1010 said:

    because i find it hard to walk to the NPC while clicking on the npc position due to the clickable NPC

    use *unitwalk script command
    or just use WARPNPC (45)

    1 hour ago, fzxree1010 said:

    i seem cant find the reason why not all NPC showing the effect.

    I see the initial *initnpctimer script command, where is the loop for it ?

    specialeffect 317;

    unfortunately this line won't work
    that's why `@auraset` exist to persist the specialeffect of certain effects, because specialeffect only cast once and won't be seen by players outside `area_size` battle_config

    1 hour ago, fzxree1010 said:

    Tried to make everyone start the event from the middle of the map every round

    warp "guild_vs5", 0,0;

    why not just change this line ...?

    1 hour ago, fzxree1010 said:

    tried to make PCBLOCK_MOVE after the warp in the middle and few seconds after the portal appears players can move freely to catch the portal

    I guess the PCBLOCK_MOVE trigger before every round start

     

    https://github.com/AnnieRuru/Release/blob/master/scripts/Games %26 Events/Run and Hide/runandhide_0.3r.txt

  13. event script .... oh yeah its been a while ...

    rathena doesn't have OnUntouch: label ... but I think its still do-able with setpcblock after trigger OnTouch label

    https://github.com/AnnieRuru/Release/blob/master/scripts/Games %26 Events/Run and Hide/runandhide_0.2r.txt

    .... as usual there are always some people trying to ruin my fun =/


    also that event script that @Poring King link to ... doesn't really fit the description in this topic,
    this one wants a several npc for players to hide, and I think only 1 npc for each player ? because he said

    4 hours ago, fzxree1010 said:

    The NPC and the player will be hidden when they are next to it

    mean once a player stand next to an npc, the npc will also goes into hiding
    that event script only has 1 set of npc doing specialeffect and ALL players are force to stand in that location

    • MVP 1
  14. -	script	command_controller	-1,{
    OnInit:
    	bindatcmd("roks", strnpcinfo(0) +"::OnRoks", 99, 99);
    	end;
    OnRoks:
    	if (!getstrlen(.@atcmd_parameters$)) {
    		message strcharinfo(0), "Please input a player name.";
    		end;
    	}
    	.@aid = getcharid(3, .@atcmd_parameters$);
    	if (!.@aid) {
    		message strcharinfo(0), "Player not online or not found.";
    		end;
    	}
    	.@origin$ = strcharinfo(0);
    	attachrid .@aid;
    	message .@origin$, "This player has "+ #CASHPOINTS +" RoK Points";
    	end;
    }

    com'on don't have to write everything out ... right ?

    • Upvote 1
×
×
  • Create New...