Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by AnnieRuru

  1. http://www.eathena.ws/board/index.php?showtopic=161236

    http://trac.rathena.org/changeset/11171/rathena

    the reason it was done like that is because

    getexp script command can be modify with the quest_exp_rate battle_config

    and set baseexp, baseexp + 100; CANNOT be modify with quest_exp_rate config

    if you use my mission board script for example, my script use set baseexp, baseexp + xxx

    hence its not configurable from this battle_config

    this is intended behavior so admin can change the rate of eathena rathena official scripts

    to promote players to do official kro quest on medium/high rate server

    and we scripters writing custom script should use set baseexp, baseexp + xxx;

    so say, which npc on your server is the responsible one to give exp bonus ?

    you probably need to show it out, issit cause by getexp or set baseexp, baseexp + xxx

  2. I'm dropping this because

    http://rathena.org/board/topic/71405-rcatch-the-flag-event-for-free-thanks/page__p__140360__hl__capture#entry140360

    there's already 3 CTF script released on this board

    however it doesn't mean I not writing battleground script already though

    I think I'll finish up wow battleground now ....

    whew I'm dealing with all battleground related topics recently

    currently seems like every server out there tries to get as much event script as they want

  3. this script can only be written using advance scripting techniques

    prontera,155,186,5    script    kjdhfksjfhs    100,{
       mes "require "+ .req_zeny +" zeny";
       next;
       if ( zeny < .req_zeny ) {
           mes "you don't have enough zeny";
           close;
       }
       getinventorylist;
       for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
           if ( compare( .itemidcompare$, ":"+ @inventorylist_id[.@i] +":" ) ) {
               .@menu$ = .@menu$ + getitemname( @inventorylist_id[.@i] ) +":";
               .@select[ .@c ] = @inventorylist_id[.@i];
               .@c++;
           }
       }
       if ( .@c == 0 ) {
           mes "you don't have require headgear in your inventory";
           close;
       }
       .@pickid = .@select[ select( .@menu$ ) -1 ];
       mes "picked : "+ getitemname( .@pickid );
       next;
       .@menu$ = getitemname( .itemid );
       for ( .@i = 1; .@i < .itemidsize; .@i++ )
           .@menu$ = .@menu$ +":"+ getitemname( .itemid[.@i] );
       .@buyid = .itemid[ select( .@menu$ ) -1 ];
       mes "are you sure you want to spend "+ .req_zeny +" zeny";
       mes "trade "+ getitemname( .@pickid ) +" into "+ getitemname( .@buyid ) +"?";
       next;
       if ( select ( "Yes", "No" ) == 2 ) close;
       if ( countitem( .@pickid ) == 0 || zeny < .req_zeny ) {
           mes "don't cheat by sending mail away !";
           close;
       }
       delitem .@pickid, 1;
       getitem .@buyid, 1;
       zeny = zeny - .req_zeny;
       mes "traded successfully";
       close;
    OnInit:
       .req_zeny = 10000; // zeny requirement
       setarray .itemid, 5001, 5002, 5003, 5004, 5005, 5006; // put all your headgear in this list
    
       set .itemidsize, getarraysize( .itemid );
       set .itemidcompare$, ":"+ .itemid[0];
       for ( .@i = 1; .@i < .itemidsize; .@i++ )
           .itemidcompare$ = .itemidcompare$ +":"+ .itemid[.@i] +":";
       end;
    }

    EDIT: search key word = item exchanger

    • Upvote 1
  4. instance script is ...

    I call it level3 event script lol

    you need some basic knowledge how to tackle pvp stuffs before learning instance commands

    once you figure out how to write without instance, it'll automatically make sense to you

    search 'instance_create' filter by member name 'annie' <- my name

    you'll find a lot of instance scripts I created hidden in script support and script request section

    so are you able to complete it without using instance ?

    the script made by icabit69 already gave out a lot of pointers

    added, oh and 5 bug reports about instance

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4880

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4962

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4963

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4964

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4965

    make sure your script doesn't hit any one of them

  5. hmm, I don't mind teaching people in script request section

    at least, 4 years ago I do teach a lot members writing scripts in script request section

    ( that time nobody open mouth with money when trading scripts, everyone happy to share out for free

    but right now everyone reply PM me Pm me ... in their mouth they are having golden teeth )

    if you don't mind having somebody point out for you and you post your unfinish script here

    I'll point your mistakes and give some guidance

    at least, this is the original idea what script request section is for

    ( yeah I know more than >70% topics in script request here are trash, but some are good ones )

  6. @darristan

    are you making this?

    although this script sound much like this one

    but you are the 1st one to suggest using instance system to do pvp

    if this is to be done, .... no need to wait for the queue anymore

    have you started this ?

    if you don't mind I'll try to tackle this

  7. why not do some cheap hack from mob_db table ... lol

    prontera,155,184,5	script	kjdshfkjsdf	100,{
    if ( getgmlevel() < 60 ) {
    	mes "I only talk to gm";
    	close;
    }
    mes "select a mvp to summon";
    next;
    set .@menu, select( .menu$ ) -1;
    monster "this", -1,-1, "--ja--", .mob_id[ .@menu ], 1, strnpcinfo(0)+"::Ondummy";
    close;
    OnInit:
    set .@mob_size, query_sql( "select id, kname from mob_db where mvp1id != 0 and mexp > 2000 order by kname asc;", .mob_id, .@mob_name$ );
    .menu$ = .@mob_name$;
    for ( .@i = 1; .@i < .@mob_size; .@i++ )
    	.menu$ = .menu$ +":"+ .@mob_name$[.@i];
    Ondummy:
    end;
    }

    • Upvote 1
  8. LOL

    it took me 2 hours to figure out, shame on myself !

    the reason behind is this script only checks the count of party member on the beginning of the script

    if ( @partymembercount==$@members) {

    however this check doesn't perform inside OnSubscriptionTeam: label

    damn, always learn something new, my old pvp/gvg script most probably also having this problem

    ... nvm I'm not working on any server anymore and hopes nobody complain =/

    OnSubscriptionTeam:
           getpartymember($@TeamID2),1;
           getpartymember($@TeamID2),2;
           [b]if ( $@partymembercount != $@members ) {
               announce "Team War : party member count does not match !", 0;
               goto lend;
           }[/b]
           copyarray $@partymembercidtc2[0],$@partymembercid[0],$@members;
           copyarray $@partymemberaidc2[0],$@partymemberaid[0],$@members;
           for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
           if(isloggedin($@partymemberaidc2[.@i],$@partymembercidtc2[.@i])) set .@countx,.@countx+1;
           }
           if(.@countx < $@members) {
           announce "Team War : "+getpartyname($@TeamID2)+"are not all online the match has been canceled",0;
           announce "Team War : registration for 2 new teams are now available",0;
           goto lend;
           close;
           }
           getpartymember($@TeamID1),1;
           getpartymember($@TeamID1),2;
           [b]if ( $@partymembercount != $@members ) {
               announce "Team War : party member count does not match !", 0;
               goto lend;
           }[/b]
           copyarray $@partymembercidtc1[0],$@partymembercid[0],$@members;
           copyarray $@partymemberaidc1[0],$@partymemberaid[0],$@members;
           for (set .@i,0; .@i<$@members; set .@i,.@i+1) {
           if(isloggedin($@partymemberaidc1[.@i],$@partymembercidtc1[.@i])) set .@countz,.@countz+1;
           }
           if(.@countz < $@members) {
           announce "Team War : "+getpartyname($@TeamID1)+"are not all online the match has been canceled",0;
           announce "Team War : registration for 2 new teams are now available",0;
           goto lend;
           close;
           }

    seems the highlighting doesn't work

    anyway its simple fix, add the stuff I did with "" and "[/b.]"

    right below getpartymember($@TeamID2),2; and getpartymember($@TeamID1),2;

  9. I don't mind writing more event script if you have some outstanding idea like this one

    http://rathena.org/board/topic/72259-wow-battlegrounds-into-ro/page__p__145102#entry145102

    if its not interesting its not worth my time to write ...

    I can easily say I made more than 20 or 30 pvp/gvg scripts in the past ( yeah its too easy now )

    just make a decent topic in script request and explain as much as possible

    so you'll attract people who interested to script it

    hmm ... u know I'm also interested in reviving this one

    http://www.eathena.ws/board/index.php?showtopic=269206

    EDIT: suddenly your post pop out,

    is that a new request ? or a bug on your script ?

  10. @annieruru can I request for a BG type registration for it, players have to go inside the waitingroom and when they reach 10 players (5 each team) the BG will start automatically, thanks in advance

    can you please test it out before you make a post

    your request has already done in the script

    its like you are posting a spam

    EDIT: just in case he edited his post, I quote his post

  11. - when clicking the NPC nothing happens/ i can't click the npc to register..

    - no error in map-server[/b]

    i don't know what part of the script stopping it to run..

    - i can't click the first part of NPC ~

    [Error]: script:menu: argument #4 (from 1) is not a label or label not found.

    [Debug]: Data: variable name='lend'

    [Debug]: Source (NPC): Team Wars at prontera (157,187)

    and here's the error I got

    if you use gm99 account, it tries to read lend label

    but you put lend: label inside another npc -> Blue Team#01

  12. kinda fun making this script

    been awhile I scripted something like mission board

    function	script	rand__	{
    .@range = getarg(0);
    .@count = getarg(2, 0);
    .@count = ( .@count == 0 || .@count > .@range )? .@range : ( .@count > 128 )? 128 : .@count;
    while ( .@i < .@count ) {
    	.@r = .@save = rand( .@i, .@range -1 ) ;
    	if ( getd(".@tmp1_"+ .@i ) == 0 ) {
    		.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
    		setd ".@tmp2_"+ .@i, .@r;
    		setd ".@tmp2_"+ .@save , .@i;
    		setd ".@tmp1_"+ .@save , 1;
    		set getelementofarray( getarg(1), .@i ), .@r;
    		if ( .@save < .@count )
    			set getelementofarray( getarg(1), .@save ), .@i;
    	}
    	.@i++;
    }
    return .@count;
    }
    
    prontera,156,188,5	script	khdfsdkjhf	100,{
    //	hatgame$ = "";
    if ( hatgame$ != "" ) {
    	explode @tmp$, hatgame$, "#";
    	callsub L_preview;
    	next;
    	for ( .@i = 1; .@i <= 3; .@i++ ) {
    		if ( countitem( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] ) < .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ] ) {
    			mes "you don't have enough "+ getitemname( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] );
    			close;
    		}
    	}
    	for ( .@i = 1; .@i <= 3; .@i++ )
    		delitem .itemreq[ atoi( @tmp$[ .@i ] ) *2 ], .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ];
    	getitem atoi( @tmp$[0] ), 1;
    	mes "congrats for "+ getitemname( atoi( @tmp$[0] ) );
    	hatgame$ = "";
    	close;
    }
    mes "to play a hat game you need "+ .itemstart[0] +" "+ getitemname(.itemstart[1])+".";
    next;
    if ( select ( "Yes", "No" ) == 2 ) close;
    if ( countitem(.itemstart[1]) < .itemstart[0] ) {
    	mes "you don't have enough required items";
    	close;
    }
    delitem .itemstart[1], .itemstart[0];
    @tmp$[0] = .rewarditem[ rand( .rewarditemsize ) ] +"";
    set .@dummy, callfunc( "rand__", .itemreqsize, $@rand, 3 );
    for ( .@i = 0; .@i < 3; .@i++ )
    	@tmp$[ .@i +1 ] = $@rand[ .@i ] +"";
    hatgame$ = implode( @tmp$, "#" );
    callsub L_preview;
    close;
    L_preview:
    mes "headgear : "+ getitemname( atoi( @tmp$[0] ) );
    mes "you have to bring";
    for ( .@i = 1; .@i <= 3; .@i++ )
    	mes .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ] +"x "+ getitemname( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] );
    return;
    OnInit:
    setarray .itemstart,
    	10, 909; // 10 jellopy
    setarray .itemreq,
    	501, 10, // 10 red pot
    	502, 9, // 9 orange pot
    	503, 8, // 8 yellow pot
    	504, 7, // 7 white pot
    	505, 6, // 6 blue pot
    	512, 1, // 1 apple
    	513, 2, // 2 banana
    	514, 3, // 3 grape
    	515, 4; // 4 carrot
    setarray .rewarditem,
    	5001, 5002, 5003, 5004;
    
    .itemreqsize = getarraysize(.itemreq) / 2;
    .rewarditemsize = getarraysize(.rewarditem);
    end;
    }

    credit to keyworld for the shuffling algorithm

    • Upvote 1
  13. ok something about level2 event script

    PS: I like to category event script into 3 levels -> read here for more info

    1st level is player vs mobs or player vs npc

    2nd level is party vs mobs or pvp/gvg/woe

    3rd level is instance and battleground script <-- MANY PEOPLE HAVEN'T LEARN THIS

    case 1:
       if(getcharid(1)==0) { mes "[Neilay]"; mes "Only those in a party can compete in this event!"; close; }
       if(getpartyleader(getcharid(1),2)!=getcharid(0)) { mes "[Neilay]"; mes "You are not the leader of your party!"; close; }
       if(BaseLevel<.MHBaseLimit) { mes "[Neilay]"; mes "You must be atleast ^0000FFBase Level "+.MHBaseLimit+"^000000 to register a party!";  close; }
       if(JobLevel<.MHJobLimit) { mes "[Neilay]"; mes "You must be atleast ^0000FFJob Level "+.MHJobLimit+"^000000 to register a party!"; close; }
       if(.MHPartyID!=0) { mes "[Neilay]"; mes "There is already a party registered."; close; }
       getpartymember getcharid(1),1;
       for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) {
           if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])) 

    your script only has 1 getpartymember type 1, which only save charID

    I wonder how your $@partymemberaid[.@i] comes from ... other script ?

    and

        switch(prompt("Start Event")) {
       case 1:
           if(.MonsterHunterStart==1) { next; mes "[Neilay]"; mes "Their is a Monster Hunter event is currently going on!"; close; }
           for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]))

    the script HIT a prompt

    remember to recall getpartymember again

    I just file a bug report to properly explain the current script engine behavior

    http://rathena.org/board/tracker/issue-6804-party-member-loop-issue-in-script-commandstxt/page__gopid__15065

    EDIT: I also dislike having checks before next; button and warp after select ok

    this will create an exploit where if the player found out about this

    they will gather all party members fulfill the requirement,

    then after party leader talk to npc and after hit next;

    party members secretly change their members and warp inside without having the requirement fulfill

    example:

    http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4929

    its the same concept

    I hope you can understand this script engine behavior when you try to script level2 event script

    EDIT2: WTF the post removed ! hahaha ..... nvm

  14. @vgrebirth

    if you're talking about my script,

    just .deny = 0; will do

    now its hard to continue discussion since there's 2 people has release the same thing in the same topic

    you have to say you are using which person's script

    usually when there's another member claim he started a script in script request,

    other members should stay out and only give suggestion/direction ....

    now this topic getting a bit out of hand

×
×
  • Create New...