Jump to content

lzm

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by lzm

  1. Hi,

    I try to add exception for few skills to Sarah Card effect. I try to add something like this:

    	switch (bl->type) {
    		case BL_PC:
    			{
    				struct map_session_data *sd = BL_CAST(BL_PC, bl);
    				if (!sd)
    					return;
    				
    				dmg_ori = dmg_new = d->damage + d->damage2;
    				if (sd->bonus.absorb_dmg_maxhp) {
    					if(skill_id) {
    						switch(skill_id) {
    							case RA_CLUSTERBOMB:
    							case SJ_NOVAEXPLOSING:
    								break;
    						}
    					} else {
    						int hp = sd->bonus.absorb_dmg_maxhp * status_get_max_hp(bl) / 100;
    						if (dmg_ori > hp)
    							dmg_new = dmg_ori - hp;
    					}
    				}
    			}
    			break;
    	}

    But I don't know how to register skill_id. How to add that check? Or is any other better method to achieve this?

  2. Hi, I think the script need an update, the PR #4195 got some update earlier and now gives error
     

    [Warning]: Unexpected type for argument 1. Expected string.
    [Debug]: Data: variable name='@sold_uniqueid' index=0
    [Debug]: Function: uniqueid_delitem
    [Debug]: Source (NPC): Recycler at prontera (163,188)
    [Error]: buildin_uniqueid_delitem: unknown item (unique_id=0).

     

  3.   - Id: 12887
        AegisName: C_Wing_Of_Fly
        Name: Infinite Flywing
        Type: Usable
        Flags:
          NoConsume: true
        Trade:
          Override: 100
          NoDrop: true
          NoTrade: true
          NoSell: true
          NoCart: true
          NoStorage: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
        Script: |
          itemskill "AL_TELEPORT",1;

    Check item 12887

  4. Hi...

    How to convert this message into a server broadcast? Thanks

    The files located inside battleground.cpp

    if (!bg) {
    		ShowWarning("bq_queue_join_solo: Could not find battleground \"%s\" requested by %s (AID: %d / CID: %d)\n", name, sd->status.name, sd->status.account_id, sd->status.char_id);
    		return;
    	}

    --- edit ---

    I figure it out by using

    intif_broadcast

     

  5. On 5/24/2020 at 12:04 AM, M a p l e said:

    Are you having a problem with this mod when using the client 2020 diff? https://github.com/rathena/rathena/pull/4944
    Like, compiles here without errors. but when I click on the "Vending" skill, instead of Zeny or Cash, only 1 Apple appears.

    Has anyone managed to fix the problem for new packets 2020?

    Update.. I can confirm this after I update my rAthena.
    Error at clif.cpp when compiling, something about

    skill_vending(sd,nameid);

    Change (sd,nameid) to p->itemId will let the compiling finish but in game, only shows 1 apple when try to vending.

  6. On 5/24/2020 at 12:04 AM, M a p l e said:

    Are you having a problem with this mod when using the client 2020 diff? https://github.com/rathena/rathena/pull/4944
    Like, compiles here without errors. but when I click on the "Vending" skill, instead of Zeny or Cash, only 1 Apple appears.

    Has anyone managed to fix the problem for new packets 2020?

     

    Oh no.. I having this problem too.. The vending still working, but only can use 2 items as currency and shown as apple in 2020 client.

  7. Hi, I just update my rathena to latest version... On my own test it's working okay... But when start make it available, I receive this crash

    Here is the result from gdb. Who understand about this error please help me fix it... Many thanks

    [Error]: WFIFOSET: Maximum write buffer size for client connection 25 exceeded, most likely caused by packet 0x01d0 (len=8, ip=x.x.x.x).
    [Error]: WFIFOSET: Maximum write buffer size for client connection 17 exceeded, most likely caused by packet 0x01d0 (len=8, ip=x.x.x.x).
    [Error]: WFIFOSET: Maximum write buffer size for client connection 28 exceeded, most likely caused by packet 0x01d0 (len=8, ip=x.x.x.x).
    
    Program received signal SIGINT, Interrupt.
    0x00007ffff5e2c410 in __memcpy_ssse3 () from /lib64/libc.so.6
    (gdb) bt full
    #0  0x00007ffff5e2c410 in __memcpy_ssse3 () from /lib64/libc.so.6
    No symbol table info available.
    #1  0x000000000063a907 in _mrealloc(void*, unsigned long, char const*, int, char const*) ()
    No symbol table info available.
    #2  0x000000000063ac13 in acquire_timer() ()
    No symbol table info available.
    #3  0x000000000063b3b9 in add_timer(long, int (*)(int, long, int, long), int, long) ()
    No symbol table info available.
    #4  0x000000000058c7cd in script_attach_state (st=st@entry=0x7fffee19f3dc) at script.cpp:4280
            sd = 0x7712b90
    #5  0x000000000058c8e6 in run_script_main (st=0x7fffee19f3dc) at script.cpp:4296
            cmdcount = 655360
            gotocount = 2048
            sd = <optimized out>
            stack = 0x7fffe8f501b4
    #6  0x000000000058ce95 in run_script (rootscript=<optimized out>, pos=<optimized out>, rid=<optimized out>,
        oid=<optimized out>) at script.cpp:4115
            st = <optimized out>
    #7  0x000000000058ceab in run_script (rootscript=<optimized out>, pos=<optimized out>, rid=<optimized out>,
        oid=<optimized out>) at script.cpp:4108
    No locals.
    #8  0x000000000060001d in status_calc_pc_sub (sd=sd@entry=0x7712b90, opt=opt@entry=SCO_NONE) at status.cpp:3718
            r = <optimized out>
            calculating = 1
            base_status = 0x771308c
            sc = 0x7713160
            b_skill = {{id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 1, lv = 9 '\t', flag = 0 '\000'}, {id = 0,
                lv = 0 '\000', flag = 0 '\000'} <repeats 139 times>, {id = 142, lv = 1 '\001', flag = 0 '\000'}, {
                id = 0, lv = 0 '\000', flag = 0 '\000'} <repeats 253 times>, {id = 405, lv = 1 '\001',
                flag = 1 '\001'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {
                id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 0,
                lv = 0 '\000', flag = 0 '\000'}, {id = 411, lv = 10 '\n', flag = 0 '\000'}, {id = 0, lv = 0 '\000',
                flag = 0 '\000'}, {id = 413, lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'},
              {id = 415, lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 417,
                lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 419, lv = 0 '\000',
                flag = 0 '\000'}, {id = 420, lv = 1 '\001', flag = 0 '\000'}, {id = 421, lv = 7 '\a', flag = 0 '\000'},
              {id = 422, lv = 5 '\005', flag = 0 '\000'}, {id = 423, lv = 9 '\t', flag = 0 '\000'}, {id = 424,
                lv = 5 '\005', flag = 0 '\000'}, {id = 425, lv = 7 '\a', flag = 0 '\000'}, {id = 426, lv = 5 '\005',
                flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'} <repeats 19 times>, {id = 445,
                lv = 0 '\000', flag = 0 '\000'}, {id = 447, lv = 1 '\001', flag = 0 '\000'}, {id = 448, lv = 0 '\000',
                flag = 0 '\000'}, {id = 449, lv = 1 '\001', flag = 0 '\000'}, {id = 450, lv = 1 '\001',
                flag = 0 '\000'}, {id = 451, lv = 0 '\000', flag = 0 '\000'}, {id = 452, lv = 0 '\000',
                flag = 0 '\000'}, {id = 453, lv = 1 '\001', flag = 0 '\000'}, {id = 454, lv = 1 '\001',
                flag = 0 '\000'}, {id = 455, lv = 0 '\000', flag = 0 '\000'}, {id = 456, lv = 1 '\001',
                flag = 0 '\000'}, {id = 457, lv = 1 '\001', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'},
              {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 0,
                lv = 0 '\000', flag = 0 '\000'}, {id = 462, lv = 7 '\a', flag = 0 '\000'}, {id = 463, lv = 7 '\a',
                flag = 0 '\000'}, {id = 464, lv = 3 '\003', flag = 0 '\000'}, {id = 465, lv = 1 '\001',
                flag = 0 '\000'}, {id = 466, lv = 0 '\000', flag = 0 '\000'}, {id = 467, lv = 7 '\a', flag = 0 '\000'},
              {id = 468, lv = 7 '\a', flag = 0 '\000'}, {id = 469, lv = 10 '\n', flag = 0 '\000'}, {id = 470,
                lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'}, {id = 472, lv = 0 '\000',
                flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'} <repeats 20 times>, {id = 493,
                lv = 0 '\000', flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'} <repeats 470 times>, {
                id = 2596, lv = 5 '\005', flag = 0 '\000'}, {id = 2597, lv = 5 '\005', flag = 0 '\000'}, {id = 2598,
                lv = 0 '\000', flag = 0 '\000'}, {id = 2599, lv = 5 '\005', flag = 0 '\000'}, {id = 0, lv = 0 '\000',
                flag = 0 '\000'}, {id = 2601, lv = 0 '\000', flag = 0 '\000'}, {id = 2602, lv = 5 '\005',
                flag = 0 '\000'}, {id = 2603, lv = 5 '\005', flag = 0 '\000'}, {id = 2604, lv = 7 '\a',
                flag = 0 '\000'}, {id = 2605, lv = 7 '\a', flag = 0 '\000'}, {id = 2606, lv = 0 '\000',
                flag = 0 '\000'}, {id = 2607, lv = 5 '\005', flag = 0 '\000'}, {id = 2608, lv = 3 '\003',
                flag = 0 '\000'}, {id = 2609, lv = 5 '\005', flag = 0 '\000'}, {id = 0, lv = 0 '\000',
                flag = 0 '\000'}, {id = 2611, lv = 5 '\005', flag = 0 '\000'}, {id = 2612, lv = 5 '\005',
                flag = 0 '\000'}, {id = 0, lv = 0 '\000', flag = 0 '\000'} <repeats 279 times>}
            i = 15
            skill = <optimized out>
            refinedef = 7500
            index = 43
    		previous_st = <optimized out>
    #9  0x0000000000601891 in status_calc_pc_ (sd=sd@entry=0x7712b90, opt=opt@entry=SCO_NONE) at status.cpp:4370
            previous_st = 0x0
            ret = <optimized out>
    #10 0x00000000006028a9 in status_calc_bl_ (bl=0x7712b90, flag=SCB_ALL, opt=SCO_NONE) at status.cpp:5415
            b_status = {hp = 30320, sp = 4813, max_hp = 30320, max_sp = 4813, str = 36, agi = 110, vit = 95,
              int_ = 146, dex = 150, luk = 2, eatk = 65, batk = 111, watk = 163, watk2 = 0, matk_min = 1147,
              matk_max = 1467, speed = 112, amotion = 260, adelay = 520, dmotion = 400,
              mode = (MD_CANMOVE | MD_LOOTER | MD_AGGRESSIVE | MD_ASSIST | MD_CASTSENSOR_IDLE | MD_NORANDOM_WALK | MD_NOCAST_SKILL | MD_CANATTACK | MD_CASTSENSOR_CHASE | MD_CHANGECHASE | MD_CHANGETARGET_MELEE | MD_CHANGETARGET_CHASE | MD_RANDOMTARGET | unknown: 256), hit = 506, flee = 391, cri = 16, flee2 = 12, def2 = 182, mdef2 = 240,
              aspd_rate2 = 24, aspd_rate = 1000, def = 647, mdef = 15, def_ele = 0 '\000', ele_lv = 1 '\001',
              size = 1 '\001', race = 10 '\n', class_ = 0 '\000', rhw = {atk = 70, atk2 = 84, range = 1,
                ele = 1 '\001', matk = 244, wlv = 4 '\004'}, lhw = {atk = 0, atk2 = 0, range = 1, ele = 1 '\001',
                matk = 0, wlv = 0 '\000'}}
            status = 0x77130f4
    #11 0x00000000005f7fe2 in status_change_start (src=src@entry=0x7712b90, bl=bl@entry=0x7712b90,
        type=type@entry=SC_SOULBALL, rate=rate@entry=10000, val1=<optimized out>, val2=<optimized out>, val2@entry=0,
        val3=<optimized out>, val4=0, duration=1, flag=0 '\000') at status.cpp:11963
            sd = 0x7712b90
            sce = 0x5e2bb04
            status = 0x77130f4
            vd = 0x7713070
            opt_flag = <optimized out>
            calc_flag = 0
            undead_flag = <optimized out>
            val_flag = <optimized out>
            tick_time = <optimized out>
            sc_isnew = false
            tick = -1
    #12 0x000000000050a53f in pc_addsoulball (sd=sd@entry=0x7712b90, interval=<optimized out>, max=20, max@entry=35)
        at pc.cpp:11384
            tid = <optimized out>
            i = <optimized out>
    #13 0x0000000000605f2b in status_change_timer (tid=3121909, tick=1120565472, id=<optimized out>,
        data=<optimized out>) at status.cpp:13926
            type = SC_SOULCOLLECT
            bl = 0x7712b90
            sd = 0x7712b90
            interval = 0
            dounlock = false
            status = 0x77130f4
            sce = 0x5e2ac08
            sc_timer_next = {<std::_Maybe_unary_or_binary_function<void, long>> = {<std::unary_function<long, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8,
                _M_functor = {_M_unused = {_M_object = 0x5dc5300, _M_const_object = 0x5dc5300,
                    _M_function_pointer = 0x5dc5300,
                    _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x5dc5300, this adjustment 6540746}, _M_pod_data = "\000S\334\005\000\000\000\000\312\315c\000\000\000\000"},
                _M_manager = 0x5e2710 <std::_Function_base::_Base_manager<status_change_timer(int, t_tick, int, intptr_t)::<lambda(t_tick)> >::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation)>},
              _M_invoker = 0x5e14e0 <std::_Function_handler<void(long int), status_change_timer(int, t_tick, int, intptr_t)::<lambda(t_tick)> >::_M_invoke(const std::_Any_data &, <unknown type in /root/OMGRO/map-server, CU 0x95ea36, DIE 0x9b0057>)>}
            __FUNCTION__ = "status_change_timer"
    #14 0x000000000040ca48 in main ()
    No symbol table info available.

     

  8. 9 hours ago, YJ1994 said:

    to

    
    getmapxy .@map$,.@x,.@y,BL_PC,.@name$[.@i];
    *getmapxy("<variable for map name>",<variable for x>,<variable for y>{,<type>,"<search value>"})
     
    This function will locate a character object, NPC object or pet's coordinates
    and place their coordinates into the variables specified when calling it. It
    will return 0 if the search was successful, and -1 if the parameters given were
    not variables or the search was not successful.
     
    Type is the type of object to search for:
     
        BL_PC - Character object (default)
        BL_NPC - NPC object
        BL_PET - Pet object
        BL_HOM - Homunculus object
        BL_MER - Mercenary object
        BL_ELEM - Elemental object

     

    it gives this error

    [Error]: buildin_getmapxy: Player with map id '0' is not found.

     

  9. Hi, I need help to update the script no longer work on latest rAthena

    // usage :
    // [npc:Sample]map#512#10
    // [npc:Sample]all#512#123
    
    
    -	script	Sample	-1,{
    OnWhisperGlobal:
    if( getgmlevel() >= 99 ){
    	// check map
    	if( @whispervar0$ == "all" ) set .@type$,"";
    	else if( @whispervar0$ == "map" ) set .@type$,strcharinfo(3);
    	else {
    		dispbottom "Error, pick 'map' or 'all' ";
    		end;
    	}
    	
    	// check item
    	set .@itemid,atoi( @whispervar1$ );
    	set .@amount,atoi( @whispervar2$ );
    	if( getitemname( .@itemid ) == "null" || .@amount < 1 ){
    		dispbottom "Enter valid item id and amount.";
    	}
    	
    	set .@self_id,getcharid(3);
    	query_sql( "SELECT COUNT(`account_id`) FROM `char` WHERE `online` = 1 ", .@total );
    	while( .@count < .@total ){
    		query_sql( "SELECT `account_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY `account_id` LIMIT 128 OFFSET "+.@offset, .@aid,.@name$ );
    		set .@i,0;
    		set .@size,getarraysize( .@aid );
    		while( .@i < .@size ){
    			if( .@aid[.@i] != .@self_id ){
    				if( .@type$ != "" ){
    					getmapxy( .@map$,.@x,.@y,0,.@name$[.@i] );
    					if( .@map$ == .@type$ ){
    						getitem .@itemid,.@amount,.@aid[.@i];
    						set .@gave,.@gave + 1;
    					}
    				}else{
    					getitem .@itemid,.@amount,.@aid[.@i];
    					set .@gave,.@gave + 1;
    				}
    			}
    			set .@count,.@count + 1;
    			set .@i,.@i + 1;
    		}
    		set .@offset,.@offset + .@size;
    		deletearray .@aid,.@size;
    		deletearray .@name$,.@size;
    	}
    	dispbottom "Gave "+.@amount+" x "+getitemname( .@itemid )+" to "+.@gave+" Player(s).";
    }
    end;
    }

    It gives this error:

    [Warning]: script: buildin_getmapxy: Invalid type 0.
    [Debug]: Source (NPC): Sample (invisible/not on a map)

    Thank you...

  10. Greetings all...

    This script is working as intended, but this will make player that play from internet cafe with thin client got kicked from the map because have same uniqueid.


    Need to make it like this:

    if last_unique_id is the same, but the IP is different, player will not get kicked out from the map.

    if last_unique_i is the same, and the IP is the same, player will get kicked out from the map.

     

    quiz_00,0,0,0	script	dck#quiz00	111,{
    OnPCLoadMapEvent:
    	set .@charmap$, strcharinfo(3);
    	if(.@charmap$!=.npcmap$) end;
    	set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_unique_id` = (SELECT `last_unique_id` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
    	if(.@len-1) {
    		for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
    			getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
    			if(.@map$==.@charmap$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
    				dispbottom "No dual in this area.";
    				warp "SavePoint",0,0;
    			}
    		}
    	}
    	end;
    	
    OnInit:
    	set        .npcmap$,	strnpcinfo(4);
    	setmapflag .npcmap$,	mf_loadevent ;
    }

    Thank you for helping me.

  11. Hi, I tried the new Morse Cave, and I can't create instance.. I'm stuck at Senior Tracker NPC

    morse_cave.png.61c6b7020ff4fa8e4baced2965f1ea76.png

    When I used the script before this new update, I'm able to create the instance. When two party go inside, one of the party get stuck in first room (after Ghoul) with Satan Morroc inside.

     

    And, for Infinite Space, after I defeat the last boss, after notice "Dimension will collapse in a few moments", nothing happen and I stuck inside the instance.

    infinite_space_error.png.2580a3a7de8d45beeb3c3789c15fe02e.png

  12. Hi, I have weird problem, after selecting the char, the screen will go black and leave small square at the top left windows, and the char can move & interact with npc although user can't see it . It only happen on 2 player, and we all have the same game files. How to fix this?

    help.jpg

×
×
  • Create New...