Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by AnnieRuru

  1. I've tested with this mission setting, before I post ver 2.4b

    this should do your trick

    [Mission Board]
    Name : test123
    Description : test
    
    Require item : 1 Red Potion
    
    [Limitation]
    Can do : Everyday
    
    
    [Rewards]
    Base Exp : 1

     

    here's a tip, when you go to Edit a mission in Administrator settings, the quest will most likely to show in Blue (default), because they are Repeatable quests

    so if you want to double check all quests on the board is a daily quest, make sure go to Edit a mission, and double check all quest should be all in Green = Everyday

  2. I couldn't reproduce your problem

    and eathena board down too, I couldn't remember which bug I've fixed between 2.0 to 2.4

     

    I remember I fixed a critical bug in 2.4a, if server owner set an Everyday field in a mission, can cause the script forever into infinite loop

    -> totally make that player unable to access to any feature on the board

     

    I think you misunderstood the time limit feature, if I still recall correctly what I wrote on eathena forum ...

    time limit is supposed to encourage players to form party ... so they can complete the quest faster

    so let's say kill 50 hydra, if solo might take about 30 minutes,

    but when force a time limitation of 15 minutes will make players realized they have to form party to kill monster faster

     

    you say you set time limit of 24 hours ... which I don't think that really serve any purpose

    because my script , although it says Everyday = Daily quest, my script reset the variable on every 12am, not every 24 hours

     

    example : most script out there use gettimetick(2) + 24*60*60 to deny players from taking quest for another 24 hours

    my scripts, including this one, follow other MMORPG method I've played, reset the variable every 12am

    I can take mission at 11.30pm, complete it, and just wait a few more minutes, 12.am I take the same mission again and complete it again

     

    damn it, I have 4 posts to explain all features about this script, and it took me about 3 days to write them all

    now paradog force me to explain everything again

     

    I tested with this setting

    [Mission Board]
    Name : test789
    Description : test
    
    Require item : 1 Red Potion
    
    
    [Limitation]
    Can do : Everyday
    Time Limit : 24 hours
    
    [Rewards]
    Base Exp : 1

     

  3. 3 hours ago, AOCzxc said:

    so your script is fixed now  for anti cheat?

    no, this event itself is exploitable,

    you shouldn't even host this event

     

    --> I decided to take out this script ever since  <---

    I'm quite sure its the same with emistry counting game, gmocean disguise event ... etc etc

    although I am yet to see players react instantly on these events, well its been a long time since I last work on a live server

  4. this topic kinda slip past my radar until a PM came in ...

     

    okies ... I even forgotten I made this script before ...

    by reading back my own script, and tested it, all I did back then was just adding announcement with the lowest chance

    just doing some clean up -> http://upaste.me/411049624930ea2ac

     

    what I don't understand is this ... isn't this feels contradict each other ? you said every play gain 1 point, then ... that total chance also doesn't add up ...

    On 4/6/2018 at 9:45 AM, Bringer said:
    • Play Option 

    Every Play of Lotti Girl you gain 1 Lotti Ladder Point and Lotti Shop Point 

    • Points System
    
    10% = 10Points Lotti Ladder Points & Lotti Shop Points
    9% = 20Points Lotti Ladder Points & Lotti Shop Points
    8% = 30Points Lotti Ladder Points & Lotti Shop Points
    7% = 40Points Lotti Ladder Points & Lotti Shop Points
    6% = 50Points Lotti Ladder Points & Lotti Shop Points
    5% = 60Points Lotti Ladder Points & Lotti Shop Points
    4% = 70Points Lotti Ladder Points & Lotti Shop Points
    3% = 80Points Lotti Ladder Points & Lotti Shop Points
    2% = 90Points Lotti Ladder Points & Lotti Shop Points
    1% = 100Points Lotti Ladder Points & Lotti Shop Points
    

     

  5. @Radian ROFL !!!

    why not just ask me personally on discord ?

     

    L_reward:
    	bg_get_data getarg(0), 1;
    	deletearray .@itemid;
    	deletearray .@itemamount;
    	for ( .@i = 0; .@i < getarg(2) /2; ++.@i ) {
    		.@itemid[.@i] = getelementofarray( getarg(1), .@i *2 );
    		.@itemamount[.@i] =  getelementofarray( getarg(1), ( .@i *2 ) +1 );
    	}
    	for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) {
    		attachrid $@arenamembers[.@i];
    		showdigit gettimetick(2) - .time, 0;
    		mail getcharid(0), "XXXRO auto-reward", "BG: Arathi Basin", "Congratulations ~ This is your reward for participating.",
    			0, .@itemid, .@itemamount;
    	}
    	detachrid;
    	return;

     

    • Upvote 1
  6. yeah, isn't that's the reason I've also put "I give up ... its too hard" option in the script if the server owner mess up the script ?

     

    I saw a typo in the script ... hmm ... maybe that's the one you refer to ?

    aura_quest$ += "0#0#0#0#0";

    change to for-loop

  7. yeah, this script is old school

    1 of my server I worked on, I saw players use openkore to cheat this event

     

    the openkore detect the announcement 999 then send a packet immediately, and most of the time, cheater wins

    I decided to take out this script ever since

     

    weird, our script looks entirely different

    //====================================================================
    // Credits to:
    //          acky, for the original script.
    //          Vampy, for adding features to the NPC.
    //          ~AnnieRuru~, for telling me how infinite loops work.
    //          henrikejg, for telling me how to fix infinite loops.
    //====================================================================
    
    prontera,155,171,5	script	Stop The Clock::Ev_StopClock	46,{
    
    set $itemid, 15702;
    
    	if (getgmlevel() == 99) goto L_GM;	
    	if ($@kc > 0 && @kcid != $@kcid) goto L_eventstarted;
    	mes "[Stop The Clock]";
    	mes "Hello ^FF0000"+strcharinfo(0)+"^000000, how can I help you?";
    	mes "^FF0000[Note] Stop The Clock starts every Tuesday, Thursday and Saturday at 6:00PM server time.^000000";
    	menu "^FF0000[Stop The Clock]^000000 information",L_info,"Exit",-;
    	close;
    	
    L_info:
       next;
       mes "[Stop The Clock]";
       mes "^FF0000Stop the clock^000000 is a game where by players need to try to stop the clock as close to 1000 as possible.";
       next;
       mes "[Stop The Clock]";
       mes "The person that stops the clock closest to 1000 wins!";
       mes "^FF0000[Note] You need to stop the clock between 950 and 1000 to win.^000000";
       next;
       mes "[Stop The Clock]";
       mes "In cases where by there's a draw, all the winners will get a prize. For example, if both John and Tom got 997, both of them will get a prize each.";
       mes "Current prize for winning: ^FF0000"+ 1000 + " " +getitemname($itemid)+" ^000000";
       close;
       
    L_eventstarted:
    			set @kcid,$@kcid;
    			setd ".timing_" + .number, $@kc;
    			setd ".player_" + .number + "$", strcharinfo(0);
    			set .number, .number+1;
    			if ($@kc == 1000) {
             announce "Jackpot! "+strcharinfo(0)+" stopped the clock on "+$@kc+".",0,0x00EEFF;
          } else {
    			announce ""+strcharinfo(0)+" stopped the clock on "+$@kc+".",0,0x00EEFF;
    			}
             end;
    	
    L_GM:
          mes "[Stop The Clock]";
          mes "Hello Administrator, what would you like to do?";
          mes "Current prize for winning: ^FF0000"+ 1000 + " " + getitemname($itemid)+"^000000";
          menu "Configure Prize",L_configure,"Start Event",-,"Stop Event",L_stop;
          if (.start == 1) goto L_started;
          next;
          mes "[Stop The Clock]";
          mes "Event started.";
          close2;
          
    L_startevent:
          set .start, 1;
    		announce "[Stop The Clock] is starting in 1 minute!",0;
    		initnpctimer;
    		end;		
    OnTimer30000:
    		if (.start == 0) goto L_suddenstop;
    		announce "[Stop The Clock] is starting in 30 seconds!",0;
          end;      
    OnTimer50000:
    		if (.start == 0) goto L_suddenstop;
    		announce "[Stop The Clock] is starting in 10 seconds!",0;
    		end;
    OnTimer55000:
    		if (.start == 0) goto L_suddenstop;
    		announce "[Stop The Clock] is starting in 5 seconds!",0;
    OnTimer60000:
    		if (.start == 0) goto L_suddenstop;
          announce "[Stop The Clock] starts now! Stop the clock as close to 1000 as possible! To stop the clock, just click the NPC.",0;
          stopnpctimer;
    		set .number, 1;
    		set .count, 1000;
    		set .winner, 0;
    		set $@kc,0;
    		set $@kci,0;
    		set $@kcid,rand(100000,999999);
    		while ($@kc < 1100) {
    			set $@kc,$@kc+1;
    			set $@kci,$@kci+1;
    			if ($@kci == 100 || ($@kci == 10 && $@kc > 600) || ($@kci == 1 && $@kc >= 950 && $@kc < 1050)) {
                if (.start == 0) goto L_suddenstop;
                announce $@kc,0;
    				set $@kci,0;
    				specialeffect 18;
    			}
             sleep 10;
    		}
    		set $@kc,0;
    		set .start, 0;
    		set .players, .number+1;
    		
    OnFinish:
          sleep 1;
          if (.count == 949) goto OnFinish3;
          if (getd(".timing_" + .number) == .count) goto L_winner1;
          set .number, .number-1;
          if (.number != 0) goto OnFinish;
          set .number, 1;
          if (.winner == 1) goto OnFinish3;
          set .count, .count-1;
          
    OnFinish2:
          sleep 1;
          if (.count == 949) goto OnFinish3;
          if (getd(".timing_" + .number) == .count) goto L_winner2;
          set .number, .number+1;
          if (.number != .players) goto OnFinish2;
          set .number, .number-1;
          if (.winner == 1) goto OnFinish3;
          set .count, .count-1;
          goto OnFinish;
          
    L_winner1:
          if (getd(".timing_" + .number) == 1000) {
          announce ""+getd(".player_" + .number + "$")+" wins! (Prize x2 for stopping exactly on 1000)",0;
          charcommand "#item " + $itemid + " 2000 " + getd(".player_" + .number + "$");
       } else {
          announce ""+getd(".player_" + .number + "$")+" wins!",0;
          charcommand "#item " + $itemid + " 1000 " + getd(".player_" + .number + "$");
          }
          set .number, .number-1;
          set .winner, 1;
          goto OnFinish;
          
    L_winner2:
          if (getd(".timing_" + .number) == 1000) {
          announce ""+getd(".player_" + .number + "$")+" wins! (Prize x2 for stopping exactly on 1000)",0;
          charcommand "#item " + $itemid + " 2000 " + getd(".player_" + .number + "$");
       } else {
          announce ""+getd(".player_" + .number + "$")+" wins!",0;
          charcommand "#item " + $itemid + " 1000 " + getd(".player_" + .number + "$");
          }
          set .number, .number+1;
          set .winner, 1;
          goto OnFinish2;
          
    OnFinish3:
          sleep 1;
          set .number, .players-1;
          while (.number != 0) {
          set getd(".timing_" + .number), 0;
          set .number, .number-1;
          }
          end;
          
    L_started:
          next;
          mes "[Stop The Clock]";
          mes "Event is already running!";
          close;
          
    L_configure:
          next;
          mes "[Stop The Clock]";
          mes "Are you sure you want ^FF0000"+ 1000 + " " + getitemname($itemid)+"^000000 to be the prize of the event?";
          menu "Yes",-,"No",L_no;
          next;
          mes "[Stop The Clock]";
          mes "Prize changed to ^FF0000"+ 1000 + " " + getitemname($itemid)+"^000000.";
    	announce "Prize changed to "+ 1000 + " " + getitemname($itemid)+".",0;
          next;
          goto L_GM;
          
    L_no:
          close;
          
    L_stop:
          next;
          if (.start == 1) {
          mes "[Stop The Clock]";
          mes "The event has already started, do you want to stop the event?";
          menu "Yes",-,"No",-;
          
          if (@menu == 1) {
                next;
                set .start, 0;
                mes "[Stop The Clock]";
                mes "Event Stopped";
                next;
                goto L_GM;
          } else {
                next;
                goto L_GM;
                }
          } else {
          mes "[Stop The Clock]";
          mes "The event hasn't started yet!";
          close;
          }
    
    L_suddenstop:
          announce "[Stop The Clock] was stopped by an Administrator.",0;
          end;
          
    OnClock1015:
    OnClock2215:
          if (gettime(4) == 1 || gettime(4) == 3 || gettime(4) == 5) end;
          goto L_startevent;
    }

     

  8. @Hyroshima

    after I review your script, reminds me of my mission board script, I'm so glad I made that script XD

    I think your script has a bug, after the player completed the objective and receive the @aura, they can do the quest again :ani_swt3:

    also also

    OnNPCKillEvent:

        if(killedrid == mob_id1){ set QT_MobKill1,QT_MobKill1+1; dispbottom "["+QT_MobKill1+"/"+mob_qt1+"] "+strmobinfo(1,mob_qt1)+""; }
        if(killedrid == mob_id2){ set QT_MobKill2,QT_MobKill2+1; dispbottom "["+QT_MobKill2+"/"+mob_qt2+"] "+strmobinfo(1,mob_qt2)+""; }
        if(killedrid == mob_id3){ set QT_MobKill3,QT_MobKill3+1; dispbottom "["+QT_MobKill3+"/"+mob_qt3+"] "+strmobinfo(1,mob_qt3)+""; }
        if(killedrid == mob_id4){ set QT_MobKill4,QT_MobKill4+1; dispbottom "["+QT_MobKill4+"/"+mob_qt4+"] "+strmobinfo(1,mob_qt4)+""; }
        if(killedrid == mob_id5){ set QT_MobKill5,QT_MobKill5+1; dispbottom "["+QT_MobKill5+"/"+mob_qt5+"] "+strmobinfo(1,mob_qt5)+""; }

    I believe that part should be mob_id1-5 ?

     

    erm ... I believe I make simple script complicated again XD

    http://upaste.me/b10549617c6f2d960

    • Love 1
  9. on 2nd thought ... hahaha nvm

     

    pet.c -> pet_catch_process2 function

    pet_catch_rate = (pet->db[i].capture + (sd->status.base_level - md->level)*30 + sd->battle_status.luk*20)*(200 - get_percentage(md->status.hp, md->status.max_hp))/100;

    the pet catching rate is something to do with monster hp percentage

    so if make the monster immune to damage, it will affect the monster catching rate

     

    btw I don't think should use OnNPCKillEvent, you are overkill

    just do it with normal monster event label enough

    	-    script    Mobs    FAKE_NPC,{
    	OnInit:
        areamonster "pvp_n_1-5",0,0,0,0,"Pokemon",3178,1,strnpcinfo(3)+"::OnMobKilled";
        areamonster "pvp_n_1-5",0,0,0,0,"Pokemon",3179,1,strnpcinfo(3)+"::OnMobKilled";
        areamonster "pvp_n_1-5",0,0,0,0,"Pokemon",3180,1,strnpcinfo(3)+"::OnMobKilled";
        end;
    OnMobKilled:
        dispbottom "Ash Catchem : How dare you kill a Pokemon!!";
        warp "Save", 0,0;
        areamonster "pvp_n_1-5",0,0,0,0,"Pokemon", killedrid,1,strnpcinfo(3)+"::OnMobKilled"; // respawn the monster
        end;
    }

  10. -- SQL command --
    REPLACE INTO `mob_db2_re` VALUES (21999,'AnnieRuru','AnnieRuru','AnnieRuru',90,61282,0,100000,117800,1,1300,2053,35,60,1,9,97,145,88,40,10,12,1,7,66,0x3295,180,1152,384,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
    
    -- mob_avail --
    //21999,4057,2,3,8,1601,2104,167,169,0,0,2
    21999,4057,2,3,8,1601,2104,167,73,0,0,2

    wearing red_tailed_ribbon , item ID 5083 but sprite ID 167

    use sprite ID not item ID

  11. hmm ... I believe this kind of stuff should be done with source edits ....

    this is my plugin -> http://herc.ws/board/topic/7127-maintenance-mode/

    and napster converted into rathena -> .... wait where is the topic gone ? ... oh wait I seriously thought he already converted into rathena

    if anyone still interested into converting, the 1.3 patch can still be found in my hercules topic, the patch is still there ( I did the patch just for him ... )

    the reason why do source edit is, once the client start, input username and password, will immediately get kick, didn't even get into character selection

     

    so hmm ... you guys are interested in making it into script version too ... let's see ...

    http://upaste.me/45e349607e335125c

    I don't think there's a way to stop the countdown once it started ...

    • Upvote 1
  12. hmm ... I totally forgotten where this script came from, I can barely remember I did made this, but forgotten the search keywords already

    btw although you PM me asked you to help solve this ... which I don't mind because I love making battleground scripts

    but the topic you post on hercules forum and this topic seems entirely different

    in other words, you are asking for 2 battleground scripts ? well fine by me, might as well just go fix both

     

    let's see ... yes Z3R0 is correct

    if ( getwaitingroomstate( 0, ".red1npcname$" ) < .minplayer2start || getwaitingroomstate( 0, ".blue1npcname$" ) < .minplayer2start ) end;

    the ".red1npcname$" there shouldn't have double quotation mark

    this should be read as an npc variable, not as a string

     

    anyways, let me fix this, and as a bonus, I also add showdigit to all the players

    http://upaste.me/ed8a496052650ef0a

  13. HAHAHA I just answer this question on the discord yesterday

    I just copy paste the chat log then

     

    Question : (Hyperion)

    how to reset the #BOSSNIAPOINTS using sql?

    i want to reset all players

     

    Answer : (me)

    actually there's a misconception that "I want to reset the variable" so I attachrid everyone and remove the variable from sql

    this method is wrong, or should I say this method consume a lot of server resources on your server

    the correct method is give it an ID, if the player doesn't match the ID, only remove that player

     

    http://upaste.me/4b0f495947cad8c0f

    the test1 example will tries to execute the SQL table, and because the key column isn't indexed (check main.sql file)

    it will perform a full table search and, if you run this query in a live server, with over 500,000 rows ... this can lag on your server

    also, addrid is evil, hercules doesn't even has this script command, it also promote bad scripting habit

    2nd thing, there's also a catch, as you can see, it runs on OnClock0000: , which means if somehow your live server is under maintenance or shut down at the time

    that label isn't run at all

    its better to use another ID like in my example, since it reset daily, I hack it with gettime


    Question : (Hyperion)

    UPDATE acc_reg_num SET value=0 WHERE 'key'="#BOSSNIAPOINTS"

    Answer : (me)

    nope, com'on ... in *athena script language ... 0 = null

    setting a variable into 0 means delete that variable, but SQL isn't like that,

    SQL 0 != null


    .

    .

    .

    why pajodex today can do exactly like what I have predicted yesterday ?

    maybe I have super power /ok

    check the upaste date, it was yesterday

    • Upvote 1
  14. 9 hours ago, Capuche said:

    Since https://github.com/rathena/rathena/commit/a8e4c83ef10dc4ccde1bd6e6f40b296d590d9b80 the script ends if there is no unit attached for sleep2 - no need to check if the player is attached.

    what I'm talking is this ...

    prontera,155,190,5    script    ksdfjsh    1_F_MARIA,{
        detachrid; // try removing this line
        attachrid 2000001;
        sleep2 5000;
        announce playerattached() +"", 0;
        debugmes playerattached() +"";
        end;
    }

    if I put detachrid; ... yup it throws no unit attached error

    but if I comment that line ... click on the npc and immediately Alt+F4, there's no error what-so-ever and the debugmes doesn't run

  15. hmm ... perhaps I misunderstood your script ....

     

    *test in my test server*

    oops ~

    you are right

     

    ah ~ even I can make mistakes sometimes /oops

     

    you directly set the condition into the array itself, and thus doesn't need to loop it

    give you 2 reps ~

     

    damn it ... now I recalled I used this trick before on my soul linker script ... how come I've forgotten

  16. ah, sry I tested this script with just numeric numbers 123456

    yeah this script convert the alphabets letters into capital letters, forgot about that

     

    //    dispbottom "["+ .@pcode$ +"]  ["+ .@pc$ +"]  ["+ .@promo$ +"]  ["+ .@code$ +"]";
        if ( !.@item || .@pc$ != .@promo$ ) {                     // CHECK IF CODE IS INVALID

  17. if(QP_Act && killedrid == .mob_id[QP_Val])

    I'm sure this condition is wrong

    if you use Comparisons conditions ( || == &&), it only return true(1) or false(0)

    since you want to make the condition to be true that is in the .mob_id array, you have to loop it

  18. use *getunittype in this case

    -    script    jksdfkjsf    FAKE_NPC,{
    OnPCDieEvent:
        if ( getunittype( killerrid ) != UNITTYPE_MOB )
            end;
        if ( !getmonsterinfo( killerrid, MOB_MVPEXP ) )
            end;
        sleep2 5000;
    //    if ( !playerattached() ) end; // it seems only hercules will throw this error, rathena hasn't fix this yet
        if ( countitem(512) ) {
            delitem 512,1;
            atcommand "@alive";
        }
        end;
    }

    well ... this is old topic so I guess ... this script command wasn't exist back then

    • Upvote 1
    • Love 1
  19. wrong answer @Akkarin /heh

    he wants the npc script to trigger with emotion -> /help

    not by typing "help"


    this particular topic makes me interested ... its been a while since I do source modifications

    BUILDIN_FUNC(emote_event) {
        int type = script_getnum(st,2);
        const char* event = NULL;
        TBL_PC *sd;
        if ( !script_rid2sd(sd) )
            return SCRIPT_CMD_SUCCESS;
        if ( type < ET_SURPRISE || type >= ET_MAX ) {
            ShowWarning( "buildin_emotion: Unknown emotion %d (min=%d, max=%d).\n", type, ET_SURPRISE, (ET_MAX-1) );
            return SCRIPT_CMD_FAILURE;
        }
        if ( script_hasdata(st,3) ) {
            event = script_getstr(st,3);
            check_event(st, event);
        }
        ShowDebug( "%s using emotion %d wanting to trigger '%s'", sd->status.name, type, event );
        return SCRIPT_CMD_SUCCESS;
    }
    	//    next step ... need to hook clif_parse_Emotion function ... erm ... this is not hercules LOL !!!

    hahaha ... totally forgotten this is rathena forum !! (damn stayed at hercules too long)

     

    ok I give up, if this member interested in switching to hercules than I might be interested to write a plugin


    EDIT:

    I just leave the steps here, just anyone interested in doing so ...

    after this, need to edit clif.cpp file, find clif_parse_Emotion, if the emoticon == ET_HELP,

    check if the player is in range with npc (see npc.cpp file ... didn't go in-depth yet) ...

    if so then trigger the said event label (hardcoded-event label -> not using the script command version yet)

     

    then ... hmm need to make the server remember all the emote_event script commands event labels... save them in an array or something ...

    then change the hardcoded event label to trigger with the saved loop ...

    well, quite a big modification if you ask me ...

     

    or maybe I'm just still noob in source coding, maybe there are better ways to do this


    edit to below ->

    yup that's why I said I leave the steps here, I'm with the hercules anyways

    surely some member here can finish this modification ................ if they are bored ... like me ~ /meh

×
×
  • Create New...