Jump to content

trizzy

Members
  • Posts

    92
  • Joined

  • Last visited

Posts posted by trizzy

  1. 17 hours ago, Emistry said:
    
    	OnPCDieEvent:
    		.@killerrid = killerrid;
    		if (strcharinfo(3) == .map$ && .@killerrid != getcharid(3)) {
    			.@total_gold_point = #GOLDPOINTS;
    			#GOLDPOINTS = 0;
    			dispbottom "You died, you lost all the points.";
    			
    			if (attachrid(.@killerrid)) {
    				#GOLDPOINTS += .@total_gold_point;
    				dispbottom "You gained "+.@total_gold_point+" gold points.";
    			}
    		}
    		end;

     

    thank you so much, works perfect!

  2. On 4/9/2020 at 8:16 AM, Emistry said:
    
        OnPCDieEvent:
            .@killerrid = killerrid;
            if (strcharinfo(3) == .map$ && .@killerrid != getcharid(3)) {
                #GOLDPOINTS = 0;
                dispbottom "You died, you lost all the point.";
            }
            end;

    try this

    @Emistry thanks for this.  can you add if you killed someone inside the gold room you'll get their points? thanks

  3. sw66n6.gif
    // Settings :
    // - Only required to edit the ShopSetting() Function
    // Notes : You may also add / remove Menu ( If any ) 
    // - Shop Currency can be either ItemID or Variable Name, but must write within Quotation Marks ( "" )
    // Ex. of Variable. -> Zeny , #CASHPOINTS , #KAFRAPOINTS , CustomVariable , #CustomVariable
    // - ERROR Message are used to show Invalid Settings in your NPC.
    
    
    // Leave this alone...
    - shop TCG_Shop -1,501:100
    
    
    trinity,110,61,6 script NPC 97,{
    function ShopSettings;
    function ValidateCost;
    function CurrencyInfo;
    function ClearData;
    function ValueConvert;
    function ErrorNotice;
    
    mes "[ ^FF0000Newbie NPC^000000 ]";
    mes "Hello ^FF0000" + strcharinfo(0) + "^000000.";
    next;
    // Menu Selection
    select("Headgear","Armors","Weapons","Accessories","Bloody Branch");
    
    ClearData();
    ShopSettings( @menu );
    npcshopitem "TCG_Shop",501,100;
    npcshopdelitem "TCG_Shop",501;
    for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)
    npcshopadditem "TCG_Shop",@ItemLists[.@i],@ItemCost[.@i];
    mes "Okay...wait awhile";
    mes "^00FF00____________________________^000000";
    CurrencyInfo( @Currency$ );
    mes "^00FF00____________________________^000000";
    callshop "TCG_Shop",1;
    npcshopattach "TCG_Shop";
    end;
    
    
    function ShopSettings {
    switch( getarg(0) ){
    Case 1:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"20508";
    // Item ID Lists
    setarray @ItemLists[0],25019,25020,25021,25022,25023,25024,25009,25011,25010,25008,25012,25013,25001,25002,25003,25004,25005,25006;
    // Item Price
    setarray @ItemCost[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
    break;
    Case 2:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"20506";
    // Item ID Lists
    setarray @ItemLists[0],20511,20512,20513,20514;
    // Item Price
    setarray @ItemCost[0],1,1,1,1;
    break;
    Case 3:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"20510";
    // Item ID Lists
    setarray @ItemLists[0],30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30041;
    // Item Price
    setarray @ItemCost[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
    break;
    Case 4:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"20509";
    // Item ID Lists
    setarray @ItemLists[0],20500,20501,20502,20503,20504,20505;
    // Item Price
    setarray @ItemCost[0],1,1,1,1,1,1;
    break;
    Case 5:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"7227";
    // Item ID Lists
    setarray @ItemLists[0],12103;
    // Item Price
    setarray @ItemCost[0],5;
    break;
    // Case 2,3,4.....etc...
    default:
    ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );
    close;
    }
    
    
    if( @Currency$ == "" )
    ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );
    if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )
    ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );
    return;
    }
    
    function ErrorNotice {
    mes "^FF0000ERROR^000000 - "+getarg(0);
    mes "^00FF00____________________________^000000";
    mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";
    close;
    }
    
    function CurrencyInfo {
    if( getitemname( atoi( getarg(0) ) ) != "null" ){
    mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";
    mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000";
    }else if( getitemname( atoi( getarg(0) ) ) == "null" ){
    mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";
    mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";
    }
    return;
    }
    
    function ValidateCost {
    if( getitemname( atoi( getarg(0) ) ) != "null" ){
    if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;
    }else{
    if( getd( getarg(0) ) < getarg(1) ) return 1;
    }
    return 0;
    }
    
    function ClearData {
    set @Currency$,"";
    set @TotalCost,0;
    deletearray @bought_nameid[0],getarraysize( @bought_nameid );
    deletearray @bought_quantity[0],getarraysize( @bought_quantity );
    deletearray @ItemLists[0],getarraysize( @ItemLists );
    deletearray @ItemCost[0],getarraysize( @ItemCost );
    return;
    }
    
    function ValueConvert {
    set .@num, atoi(""+getarg(0));
    if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
    set .@l, getstrlen(""+.@num);
    for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
    if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
    }
    return .@num$;
    }
    
    OnBuyItem:
    ShopSettings( @menu );
    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)
    if( @ItemLists[@j] == @bought_nameid[@i] )
    set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );
    mes "^FF0000       BILLING LIST^000000";
    mes "^00FF00____________________________^000000";
    for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )
    mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";
    mes "^00FF00____________________________^000000";
    
    if( getitemname( atoi( @Currency$ ) ) != "null" )
    mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" x "+getitemname( atoi( @Currency$ ) )+"^000000";
    else if( getitemname( atoi( @Currency$ ) ) == "null" ){
    mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" "+@Currency$+"^000000";
    }
    
    mes "^00FF00____________________________^000000";
    if( ValidateCost( @Currency$,@TotalCost ) ){
    if( getitemname( atoi( @Currency$ ) ) != "null" )
    mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+getitemname( atoi( @Currency$ ) )+"^000000";
    else{
    mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+@Currency$+"^000000";
    }
    }else{
    if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){
    if( getitemname( atoi( @Currency$ ) ) != "null" )
    delitem atoi( @Currency$ ),@TotalCost;
    else{
    set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;
    }
    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    getitem @bought_nameid[@i],@bought_quantity[@i];
    message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items.";
    mes "Thank you for shopping.";
    }
    }
    OnInit:
    waitingroom "NPC",0;
    ClearData();
    close;
    
    }
    

     

  4.  

    place this to your battle.c in battle_check_target:

     

     

    if ( s_bl->type == BL_PC && t_bl->type == BL_MOB ) {
    struct map_session_data *sd = BL_CAST( BL_PC, s_bl );
    if ( ( ( (TBL_MOB*)target )->mob_id == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "guild_vs1" ) ) &&
    ( sd->status.guild_id == mapreg_readreg( add_str("$koegid") ) || battle_getcurrentskill(src) > 0 ) )
    return 0;
    }

     

     

    and recompile

     

    thanks it works

  5. i have problem with the script, after i captured the emp im still able to hit the emperium. thanks in advance

    -	script	KoE	-1,{
    OnInit:
    	disablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	bindatcmd "koe", strnpcinfo(0)+"::OnCommand", 99,99;
    	end;
    OnCommand:
    	if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
    	else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
    	else {
    		dispbottom "type - '@koe on' to start the event";
    		dispbottom "type - '@koe off' to end the event";
    	}
    	end;
    OnClock0430:
    L_start:
    	if ( .start ) end;
    	gvgon "guild_vs1";
    	announce "The King of Emperium Hill has begun!", bc_all;
    	.start = 1;
    	enablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	$koegid = 0;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 7;
    	monster "guild_vs1",49,49,"EMPERIUM",2041,1,"KoE::OnEmpDead";
    	end;
    OnClock0515:
    L_end:
    	gvgoff "guild_vs1";
    	announce "The King of Emperium Hill is over!", bc_all;
    	.start = 0;
    	enablenpc "Exit#KoE";
    	disablenpc "The King#KoE";
    	killmonsterall "guild_vs1";
    //	maprespawnguildid "guild_vs1", $koegid, 6;
    	end;
    OnEmpDead:
    	$koegid = getcharid(2);
    	announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 6;
    	sleep 500;
    	if ( .start )
    		monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
    	end;
    }
    
    // KoE Entrance
    prontera,150,150,4	script	The King#KoE	58,{
        mes "[The King]";
    	if ( !getcharid(2) ) {
    		mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
    		close;
    	}
        mes "Hello.";
        mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
    	if ( select ( "Yes", "No" ) == 2 ) close;
        switch( rand(1,4) ){
            case 1:	warp "guild_vs1", 50, 88; end;
            case 2:	warp "guild_vs1", 88, 50; end;
            case 3:	warp "guild_vs1", 50, 11; end;
            case 4:	warp "guild_vs1", 11, 50; end;
    	}
    }
    
    // KoE Exit
    guild_vs1,49,56,5	script	Exit#KoE	51,{
    	mes "[Exit]";
    	mes "See ya.";
    	if ( getcharid(2) == $koegid )
    		getitem 7227, 100;
    		getitem 20080, 50;
    		getitem 29999, 50;
    	close2;
    	warp "Save",0,0;
    	end;
    }
    
    // Flags
    guild_vs1,49,38,4	script	King of Emperium Hill#1::koe_flag	722,{
    	if ( !$koegid ) end;
    	mes "[King of Emperium Hill]";
    	mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild.";
    	close;
    OnRevKoE:
    	flagemblem $koegid;
    	end;
    }
    guild_vs1,61,49,6	duplicate(koe_flag)	King of Emperium Hill#2	722
    guild_vs1,38,49,2	duplicate(koe_flag)	King of Emperium Hill#3	722
    guild_vs1,49,61,0	duplicate(koe_flag)	King of Emperium Hill#4	722
    
    guild_vs1	mapflag	nobranch
    guild_vs1	mapflag	nomemo
    guild_vs1	mapflag	nopenalty
    guild_vs1	mapflag	noreturn
    guild_vs1	mapflag	nosave	SavePoint
    guild_vs1	mapflag	noteleport
    guild_vs1	mapflag	gvg_noparty
    guild_vs1	mapflag	nowarp
    guild_vs1	mapflag	nowarpto
    guild_vs1	mapflag	guildlock
    
  6. I'm curious, what's the point of this exactly? Are you trying to give members of a guild increased HP on their home turf, or what? I'm honestly interested.

    i'm trying to add additional effect for my quest headgear combo.

     

    Oh sorry I missed a parenthesis.

     

    { if (strcharinfo(3) == "guild_vs1") { bonus,bMaxHPRate,10; } }
    

     

    yeah that's what im talking about. thanks mate

  7.  

    In your item_combo_db.txt file you would make a combo with the items you want, and the script would be something like

    { if (strcharinfo(3) == "guild_vs1" { bonus,bMaxHPRate,10; } }
    

    i got error.

     

    [Error] : script error on db/import/item_combo_db.txt line 4
    parse_simpleexpr: unmatched ')'
    *    4 : { if (strcharinfo(3) == "guild_vs1" '{' bonus bMaxHPrate,10; }}
  8. What i want is for example:

    Cell Headgear

    Cell Wing

    Cell Tail

    if you wear this set --->> increase 10% HP on guild_vs1 map only in guild_vs1 will work the 10% HP, if you go out guild_vs1 or missing 1 part of the Cell set the 10%HP bonus will disappear.

     

    im hoping this would be possible thanks in advance.


    Anyone?

  9. show us how do u add that

    isn't

    str: true

    agi: true

     

    on groups.conf?

    To disable /str+ X you need to mod the src (I think it's clif_parse_StatusUp function)

    is this one?

    /// Request to increase status (CZ_STATUS_CHANGE).
    /// 00bb <status id>.W <amount>.B
    /// status id:
    ///     SP_STR ~ SP_LUK
    /// amount:
    ///     Old clients always send 1 for this, even when using /str+ and the like.
    ///     Newer clients (2013-12-23 and newer) send the correct amount.
    void clif_parse_StatusUp(int fd,struct map_session_data *sd)
    {
    int increase_amount = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
    
    
    if( increase_amount < 0 ) {
    ShowDebug("clif_parse_StatusUp: Negative 'increase' value sent by client! (fd: %d, value: %d)\n",
    fd, increase_amount);
    }
    pc_statusup(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]),increase_amount);
    }
  10.  

    try

    case MO_EXTREMITYFIST:
    	skillratio += 100*(7 + sstatus->sp/10);
    	skillratio = min(6000,skillratio); //We stop at roughly 50k SP for overflow protection
    	break;
    

    Nothing Changes Sir.

    case MO_EXTREMITYFIST:
    	skillratio += 100*(7 + sstatus->sp/10);
    	skillratio = min(6000,skillratio); //We stop at roughly 50k SP for overflow protection
    	break;

    i delete also this code and recompile my server and login in game my SP still the same and nothing changes!

    Help please. T_T

  11. i've tried this but nothing happen.

    src/battle.c search

    case MO_EXTREMITYFIST:
    skillratio += 100*(7 + sstatus->sp/10);
    skillratio = min(500000,skillratio); //We stop at roughly 50k SP for overflow protection
    break;

     

    change

    skillratio += 100*(7 + sstatus->sp/10);

     

    to

    skillratio += 100*(7 + min(sstatus->sp,6000)/10);

  12. Ok here you need to do...

     

    look for this line on skill.conf inside the battle folder...

    // Using 'old' behavior for devotion vs reflect damage? (Note 2)
    // Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devote the reflected damage),
    // when player with devotion attacks player with reflect damage ability (item bonus or skill),
    // the damage will be taken by the person who provides devotion instead the attacker.
    devotion_rdamage: 0
    
    // Officially, reflecting shield (SC_REFLECTDAMAGE) reflects physical damage by skill or normal attack.
    // But if the target is being devoted, it ONLY reflects the damage for melee skill. (Note 1)
    devotion_rdamage_skill_only: yes
    

    and change it to this

    // Using 'old' behavior for devotion vs reflect damage? (Note 2)
    // Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devote the reflected damage),
    // when player with devotion attacks player with reflect damage ability (item bonus or skill),
    // the damage will be taken by the person who provides devotion instead the attacker.
    devotion_rdamage: 100
    
    // Officially, reflecting shield (SC_REFLECTDAMAGE) reflects physical damage by skill or normal attack.
    // But if the target is being devoted, it ONLY reflects the damage for melee skill. (Note 1)
    devotion_rdamage_skill_only: no
    

    I hope this solve your issue about the reflect..

    i check the skill.conf it was default

    // Using 'old' behavior for devotion vs reflect damage? (Note 2)
    // Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devote the reflected damage),
    // when player with devotion attacks player with reflect damage ability (item bonus or skill),
    // the damage will be taken by the person who provides devotion instead the attacker.
    devotion_rdamage: 100
     
    // Officially, reflecting shield (SC_REFLECTDAMAGE) reflects physical damage by skill or normal attack.
    // But if the target is being devoted, it ONLY reflects the damage for melee skill. (Note 1)
    devotion_rdamage_skill_only: no
  13. Hello rAthena community, im having problem the of this 2 topic

    https://rathena.org/board/topic/78425-fix-devotion-for-r17013-reflect-goes-to-atker-not-pally/

    https://rathena.org/board/topic/79396-help-about-devotion-reflect-issue/

     

    my revision is r17709

    A Palldin

    B Champion

     

    C Enemy

     

    A and B are in both party A casted reflect and C also casted reflect

    and B casted asura on C and all character are dead. how's possible?

     

    TIA.

     

     

×
×
  • Create New...