Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Posts posted by AnnieRuru

  1. no

    prontera,155,177,0,0	boss_monster	Maya	1147,1,7200000,600000,1

    to have a MVP tomb, boss_monster is needed

    and my script uses *monster script command, its different

    and what's the point having MVP tomb in this script ?

    this script supposed to let players freely kill MVP as much as they want

    you'll mostly found this npc in medium/high rate server

  2. for soundeffect or soundeffectall ,

    the file name must be within 23 characters INCLUDE the .wav extension

    soundeffect "1234567890123456789.wav", 0; // this will play the soundeffect

    sleep2 1000;

    soundeffect "12345678901234567890.wav", 0; // throw gravity error

  3. by just reading through the script (I didn't test, I can read eathena script language like a storybook)

    this is a pvp script (moderator pls move)

    players can warp inside the map anytime

    the map is pvpon

    and that map has all bunch of tinker toys to kill other players

    and all bunch of mines that you step on it you get debuff/hp loss... etc

    wow ... really nice idea ... never thought of that

  4. stop bumping

    I already having this topic bookmarked in my to-do list

    give me 1 week

    its kinda sad its still too few members can make battleground script

    so I think I'll write as much as possible until scripting support start having battleground related question

    EDIT:

    forgot to say this will be a public release script

    I'll post in this topic when almost done

    • Upvote 1
  5. o.O

    http://www.eathena.w...dpost&p=1517519

    I strongly against having a npc pop up for receiving rewards

    because all battleground script has a timeout to prevent player sit inside own the map for themself, other players no chance to play

    so I suggest giving the rewards straight after event finish

    set .atkteam, waitingroom2bg( "prontera", 152,187, "", "", "Attack Team" );

    copyarray .atkteam_aid, $@arenamembers, $@arenamembersnum; // retrieve all account ID of offensive team

    set .defteam, waitingroom2bg( "prontera", 160,187, "", "", "Defend Team" );

    copyarray .defteam_aid, $@arenamembers, $@arenamembersnum; // retrieve all account ID of defensive team

    if ( .endbykill ) {

    announce "attacker won", 0;

    for ( .@i = 0; .@i < 2; .@i++ )

    getitem 673, 1, .atkteam_aid[.@i];

    } else {

    announce "defender won", 0;

    for ( .@i = 0; .@i < 2; .@i++ )

    getitem 673, 1, .defteam_aid[.@i];

    killmonster "bat_a01", "custom_bg#control::onend";

    }

  6. prontera,151,188,5	script	kdjshfskh	100,{
    //	monster_hunt_deny = 0;
    if ( .start == 2 ) {
    	mes "sry somebody already started";
    	close;
    }
    if ( .start == 0 ) {
    	mes "sry event not running";
    	close;
    }
    mes "open";
    next;
    select "register";
    if ( getcharid(1) == 0 ) {
    	mes "you must be in a party";
    	close;
    }
    if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) {
    	mes "you are not party leader";
    	close;
    }
    getpartymember getcharid(1), 1;
    if ( $@partymembercount < .partysize ) {
    	mes "you must form a party of "+ .partysize;
    	close;
    }
    getpartymember getcharid(1), 2;
    for ( .@i = 0; .@i < $@partymembercount; .@i++ )
    	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) )
    		.@count++;
    if ( .@count < .partysize ) {
    	mes "you must have "+ .partysize +" party members online";
    	close;
    }
    .@origin = getcharid(3);
    for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    		attachrid $@partymemberaid[.@i];
    		if ( baselevel < .baselevel || joblevel < .joblevel ) {
    			.@name$ = strcharinfo(0);
    			attachrid .@origin;
    			mes .@name$ +" does not meet the level requirement";
    			close;
    		}
    		if ( monster_hunt_deny + .deny > gettimetick(2) ) {
    			.@name$ = strcharinfo(0);
    			attachrid .@origin;
    			mes .@name$ +" are still under 5 min cooldown";
    			close;
    		}
    	}
    }
    for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    		attachrid $@partymemberaid[.@i];
    		monster_hunt_deny = gettimetick(2);
    	}
    }
    warpparty "pvp_n_1-3", 100, 109, getcharid(1);
    monster "this", -1,-1, "--ja--", 1002, 1, strnpcinfo(3)+"::Onmobdead";
    announce strcharinfo(1) +" has started monster hunting", 0;
    .start = 2;
    .partyid = getcharid(1);
    close;
    Onmobdead:
    announce strcharinfo(1) +" has completed monster hunting", 0;
    getpartymember getcharid(1), 2;
    for ( .@i = 0; .@i < $@partymembercount; .@i++ )
    	getitem 501, 1, $@partymemberaid[.@i];
    warpparty "SavePointAll", 0,0, .partyid;
    .start = 0;
    .partyid = 0;
    end;
    //OnWhisperGlobal:
    OnMinute00:
    if ( .start == 2 )
    	warpparty "SavePointAll", 0,0, .partyid;
    announce "monster hunting is open", 0;
    .start = 1;
    end;
    OnPCDieEvent:
    OnPCLogoutEvent:
    if ( strcharinfo(3) != "pvp_n_1-3" ) end;
    announce strcharinfo(1) +" has failed monster hunting", 0;
    warpparty "SavePointAll", 0,0, .partyid;
    .start = 1;
    .partyid = 0;
    end;
    OnInit:
    .deny = 300; // 300 seconds to deny players going in again
    .partysize = 3; // 10 player members needed to start
    .baselevel = 99; .joblevel = 1; // level requirement
    end;
    }

    simply 1 of the simplest event script that I can write on fly

    EDIT:

    forgot to add mapflag like nowarpto nowarp noteleport partylock nomemo nopenalty nosave =/

    • Upvote 1
  7. 1 way I can think of is

    OnPCLogoutEvent:

    query_sql "update `char` set zeny = "+ zeny +" where account_id = "+ getcharid(3);

    which would save their zeny after they logout

    but just like you say something about server crash and possible exploits

    / Min database save intervals (in ms)

    // Prevent saving characters faster than at this rate (prevents char-server

    // save-load getting too high as character-count increases)

    minsave_time: 100

    // Apart from the autosave_time, players will also get saved when involved

    // in the following (add as needed):

    // 1: after every successful trade

    // 2: after every vending transaction

    // 4: after closing storage/guild storage.

    // 8: After hatching/returning to egg a pet.

    // 16: After successfully sending a mail with attachment

    // 32: After successfully submitting an item for auction

    // 64: After successfully get/delete/complete a quest

    // NOTE: These settings decrease the chance of dupes/lost items when there's a

    // server crash at the expense of increasing the map/char server lag. If your

    // server rarely crashes, but experiences interserver lag, you may want to set

    // these off.

    save_settings: 127

    good luck in finding these in source

    and use Sql_Query .... its the command used in the source instead query_sql used by eathena script

    its too hassle to do this

    I don't find this modification has any practical uses

  8. you can try use attachrid-on-all-accounts, loop through all accounts on the server with checkvending()

    or use addrid script command

    http://www.eathena.w...howtopic=186459

    but I'm not a fan of using addrid because there's been reported it produce lag-spike

    personally, I better off just write a new command

    BUILDIN_FUNC(getusers_novend) {
    struct s_mapiterator* iter = mapit_getallusers();
    struct map_session_data* sd;
    int count = 0;
    for ( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
    	if ( sd->state.autotrade == 0 && sd->state.vending == 0 && sd->chatID == 0 )
    		count++;
    script_pushint( st, count );
    mapit_free(iter);
    return 0;
    }

    BUILDIN_DEF(getusers_novend,""),

    announce getusers_novend() +"", 0;

    announce total players exclude vending/autotrade/chat-box

    just replace getusers_novend() with getusers(1)

    • Upvote 1
  9. of course not

    it just some newbie script that warp back to town after repeatedly killed the same person

    and I tot that script has already put in comments

    the hint is change warp into #cashpoints--

    EDITED:

    I forgot that I changed to warp instead of atcommand @jail

  10. got a PM to write this...

    BUILDIN_FUNC(getitemslotspc) {
    TBL_PC* sd = script_rid2sd(st);
    int pos = script_getnum( st, 2 ), i;
    if ( sd == NULL )
    	return 0;
    if ( pos < 0 || pos >= ARRAYLENGTH(equip) ) {
    	script_pushint(st,-1);
    	return 0;
    }
    i = pc_checkequip( sd, equip[pos -1] );
    if ( i < 0 )
    	script_pushint( st, -1 );
    else
    	script_pushint( st, sd->inventory_data[i]->slot );
    return 0;
    }

    BUILDIN_DEF(getitemslotspc,"i"),

    what a joke, 2 hours to tackle this <.<

    *getitemslotspc( <equip slot> );

    return the amount of slot from equipment

    if return -1 means that equip position is not equipped

    dispbottom getitemslotspc(EQI_HEAD_TOP)+""; // show the amount of slots available on top headgear

    • Upvote 1
  11. @Jezu

    you mean this ?

    http://rathena.org/b...round-conquest/

    yes its possible, just need to find the right person and a right time to do it lol

    @mightyryan

    this request is not even as 1/2 as interesting as this

    http://rathena.org/b...rounds-into-ro/

    which my goal is to finish that one

    the only reason I pick this one up is to refresh what I've done on that script

    because right now I've totally forgotten how I made that

    @biohazard0134

    I'm still writing this ....

    I know I'm behind schedule a bit, because today got a lot interesting topic pops up ... (especially just learn about *freeloop)

    and this request is not one of my goal ... I just take this as a stepping stone to wow topic I mention earlier

    I'm still studying that script and make both of this 2 scripts look similar

    so I can pick that one up immediately after I've done with this one

    bg_emp.txt

    feel lazy to add those announcement and dialog, so the script is unfinished

    so we start from here ...

    1.

    the npc prize giver idea is abit too weird,

    this map is large, so where u want the npc be ?

    please at least try this in your test server before you next post ( dual client )

  12. I cannot reproduce your error

    post-8685-0-64630500-1350200466_thumb.jpg

    the name in red, I can't kill it

    try do some debugging instead

        if ( s_bl->type == BL_PC && t_bl->type == BL_MOB ) {
           char debug[255];
           struct map_session_data *sd = BL_CAST(BL_PC, s_bl);
           sprintf ( debug, "[Debug] mob ID: %d | map name: %s | guild ID: %d | $KOEGUILD: %d", ((TBL_MOB*)target)->class_, mapindex_id2name(sd->mapindex), sd->status.guild_id, mapreg_readreg( add_str("$KOEGUILD") ) );
           clif_displaymessage( sd->fd, debug );
           if ( ( ((TBL_MOB*)target)->class_ == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "guild_vs1" ) ) &&
               ( sd->status.guild_id == mapreg_readreg( add_str("$KOEGUILD") ) || battle_getcurrentskill(src) > 0 ) ) {
                   clif_displaymessage( sd->fd, "cannot hit emperium" );
                   return 0;
           }
       }

×
×
  • Create New...