Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1.  

     

    This one is either pc.h or mmo.h, I forget which one. You have too many event queues happening, so you need to increase the max event queue size.

     

    maybe map.h

    Found it! but is there a max cap of size?

     

     

    I have no idea. I have mine set at 10, but I don't know what the consequences of increasing it are.

  2. Open monster_size_effect.lub inside the system folder, search for the DL's ID (1272) and delete the line including it ( [1272] = { MonsterSize = 1, MonsterEff = EFFECT.EF_DEVIL5 }, ).

     

    This file adds special visual effects and changes the sprite's size for some monsters, like champions.

     

    Wow, amazing! This is great. We had to disabled the blind effect completely because of this @_@ 


  3. Yup it seems this may be official behavior...it is silly though isn't it. A former dev on my server fixed this for me. If I recall, another issue is if you don't have an item equipped in that area, the skill Chemical Protection cannot be cast.

     

    I'm sure he wouldn't mind me sharing this here. Hopefully...

    Can't guarantee it will work or if all the code is the same as this was from an old revision.

     

    1. Open skill.c

    - Find:

             case AM_CP_ARMOR:
             case AM_CP_HELM:
             {
                unsigned int equip[] = { EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP };
                int index;
                if ( sd && (bl->type != BL_PC || (dstsd && pc->checkequip(dstsd, equip[skill_id - AM_CP_WEAPON]) < 0) ||
                    (dstsd && equip[skill_id - AM_CP_WEAPON] == EQP_SHIELD && pc->checkequip(dstsd, EQP_SHIELD) > 0
                    && (index = dstsd->equip_index[EQI_HAND_L]) >= 0 && dstsd->inventory_data[index]
                    && dstsd->inventory_data[index]->type != IT_ARMOR)) ) {
                     clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
                     map->freeblock_unlock(); // Don't consume item requirements
                     return 0;
                 }
                 clif->skill_nodamage(src, bl, skill_id, skill_lv,
                 break;
             }
             case AM_TWILIGHT1:
    
     

    Replace with:

             case AM_CP_ARMOR:
             case AM_CP_HELM:
             {
                if ( sd && (bl->type != BL_PC ) ) {
                     clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
                     map->freeblock_unlock(); // Don't consume item requirements
                     return 0;
                 }
                 clif->skill_nodamage(src, bl, skill_id, skill_lv,
                sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
                if (tsc->data[SC_PROTECTWEAPON])
                    status_change_end(bl, SC_NOEQUIPWEAPON, INVALID_TIMER);
                if (tsc->data[SC_PROTECTSHIELD])
                    status_change_end(bl, SC_NOEQUIPSHIELD, INVALID_TIMER);
                if (tsc->data[SC_PROTECTARMOR])
                    status_change_end(bl, SC_NOEQUIPARMOR, INVALID_TIMER);
                if (tsc->data[SC_PROTECTHELM])
                    status_change_end(bl, SC_NOEQUIPHELM, INVALID_TIMER);
                 break;
             }
             case AM_TWILIGHT1:
    
    
     

    2. Then find:

             // Full Chemical Protection
             case CR_FULLPROTECTION:
             {
                unsigned int equip[] = { EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP };
                 int i, s = 0, skilltime = skill->get_time(skill_id, skill_lv);
                 for ( i = 0; i < 4; i++ ) {
                    if ( bl->type != BL_PC || (dstsd && pc->checkequip(dstsd, equip[i]) < 0) )
                         continue;
                    if ( dstsd && equip[i] == EQP_SHIELD ) {
                        short index = dstsd->equip_index[EQI_HAND_L];
                        if ( index >= 0 && dstsd->inventory_data[index] && dstsd->inventory_data[index]->type != IT_ARMOR )
                            continue;
                    }
                     sc_start(src, bl, (sc_type)(SC_PROTECTWEAPON + i), 100, skill_lv, skilltime);
                     s++;
                 }
                 if ( sd && !s ) {
    
     

    And replace with:

             // Full Chemical Protection
             case CR_FULLPROTECTION:
             {
                 int i, s = 0, skilltime = skill->get_time(skill_id, skill_lv);
                 for ( i = 0; i < 4; i++ ) {
                    if ( bl->type != BL_PC )
                         continue;
                     sc_start(src, bl, (sc_type)(SC_PROTECTWEAPON + i), 100, skill_lv, skilltime);
                    status_change_end(bl, (sc_type)(SC_NOEQUIPWEAPON + i), INVALID_TIMER);
                     s++;
                 }
                 if ( sd && !s ) {
    
    

  4.  

     

    Make an NPC wherever you like and put something like such in it.

     

    prontera,150,150,3    script    Start That Event    4_F_TELEPORTER,{
    
        mes "Would you like to start that event?";
        next;
        if (select("Yes", "No") == 2)
            close;
    
        close2;
        donpcevent "Free For All::OnStartEvent";
        end;
    }
    

    Sir should i remove:

     

    OnClock1245:

    OnClock1645:

    OnClock2045:

    OnClock0045:

    OnClock0445:

    OnClock0845

     

    Its up to you. Those cause the everything below the label 'OnEventStart' to trigger at those times.


  5. Make an NPC wherever you like and put something like such in it.

     

    prontera,150,150,3    script    Start That Event    4_F_TELEPORTER,{
    
        mes "Would you like to start that event?";
        next;
        if (select("Yes", "No") == 2)
            close;
    
        close2;
        donpcevent "Free For All::OnStartEvent";
        end;
    }
    

  6. The npc is not attached to an instance because only those that are inside an instance map are attached, so, floating npcs can't read instance variables because they are not attached. Try put a location for the npc:

     

    2@nyd,1,1,0	script	nyd_logout_exploit	FAKE_NPC,{
    	end;
    
    OnPCLogoutEvent:
    	if (!compare(strcharinfo(PC_MAP), "2@nyd")) end;
    
    	getmapxy (@map$,@x,@y,UNITTYPE_PC);
    	if ('ins_nyd2 < 4) end;
    
    	if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390))
    		#nyd_nest = gettimetick(2) + ( 60 * 60 * 24 * 3);	// 3 Days
    	end;
    }
    

     

    However, this practice is not recommended and will be harmful because you will be duplicating the OnPCLogoutEvent with every instance created.

     

    Maybe you could try with this other:

     

    -	script	nyd_logout_exploit	FAKE_NPC,{
    	end;
    
    OnPCLogoutEvent:
    	if (!compare(strcharinfo(PC_MAP), "2@nyd"))
    		end;
    	.@instance_id = has_instance2("2@nyd");
    	instance_attach(.@instance_id);
    	getmapxy (@map$, @x, @y, UNITTYPE_PC);
    	if ('ins_nyd2 < 4)
    		end;
    	if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390))
    		#nyd_nest = gettimetick(2) + (60 * 60 * 24 * 3);	// 3 Days
    	end;
    }
    

     

    This other npc manually attaches the floating npc to the instance gived by has_instance2() command, and then I think you can read the instance variable (needs test).

     

    Thank you again good sir. I will try it out and get back to you.

     

    The second one worked perfect, just as I imagined it would. Not sure if there is a way to error it out, but as it stands looks great!


  7. Hello,
     
    I have created a script which will assign an account-wide delay timer to those who log out to avoid the warp-out NPC which I have variables attached to.
     
    My problem is the 'ins_nyd2 value - it always returns 0.
    [Warning]: script_get_val: cannot access instance variable ''ins_nyd2', defaulting to 0
     
    The script works fine if I removethe  if ('ins_nyd2 < 4) end; line, but there are cases when players genuinely disconnect, which would lock them out of finishing the instance.
     

     

    
    -    script    nyd_logout_exploit    FAKE_NPC,{
     
    OnPCLogoutEvent:
        if (!compare(strcharinfo(PC_MAP), "2@nyd")) end;
     
        getmapxy (@map$,@x,@y,UNITTYPE_PC);
        if ('ins_nyd2 < 4) end;
     
        if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390))
            #nyd_nest = gettimetick(2) + ( 60 * 60 * 24 * 3);    // 3 Days
        end;
    }
    
    

  8. Since normal instance maps has all of them an "@" in their name, you can use that for identify the instance maps using compare() script command. In example, give this script to the Giggling Box:

     

    	Script: <"
    		if (compare(strcharinfo(PC_MAP), "@"))
    			announce "You are on an Instance Map.", bc_self;
    		else
    			announce "You aren't on an Instance Map.", bc_self;
    	">
    

    That script will compare if the string "@" is contained inside the string generated by strcharinfo(PC_MAP), so, if player is in an instance map (let's say 1@tower) it will return true (1) otherwise it will return false (0) when name doesn't have the "@" string.

     

    Thank you, sir. I think this is the best that can be done.


  9. I'm not sure if can be possible of that, but an alternative that I can suggest is, if you are setting mf_zone by npc, use a temporary global variable to save the fact that you already setted that mapflag according to your needs, and then do the check over that variable.

     

    Hm well, I want to edit an item script, Giggling Box to be precise, so it will have a different effect in Memorial Dungeon than in general game play.

    Any advice for that one? :o


  10. I am trying to use getmapflag to detect a zone, but cannot get it to work.

    Is it possible. Any advice?

     

    Thank you.

     

     

    if (getmapflag("" + strcharinfo(PC_MAP) + "", mf_zone) == "Memorial Dungeon") script here;
    else other script here;
    end;
    

  11. Hi,

    I have two servers - one ubuntu, one centos.
    They run exactly the same files, yet CentOS has issues starting sometimes.

    When loading scripts on CentOS, this can sometimes happen if there is something odd in a script:

    [Info]: Done loading '10146' NPCs:
            -'3306' Warps
            -'72' Shops
            -'6754' Scripts
            -'3614' Spawn sets
            -'40842' Mobs Cached
            -'14' Mobs Not Cached
    

    (notice no OnInit events executed)

    While on ubuntu, the exact same files loads perfect.

    [Info]: Done loading '10631' NPCs:
            -'3306' Warps
            -'72' Shops
            -'7239' Scripts
            -'3614' Spawn sets
            -'40842' Mobs Cached
            -'14' Mobs Not Cached
    [Status]: Event 'OnInit' executed with '1346' NPCs.
    

    Does anybody know why this may be happening?
    Thanks, really appreciate anybody who can help.

     

    edit: Also I know which script causes issue: it is one which uses setnpcdisplay.

    -	script	::the_wall	FAKE_NPC,{
    end;
    OnInit:
    	setnpcdisplay "" + strnpcinfo(NPC_NAME_UNIQUE) + "",1905;
    	end;
    }
    

     

    Again, works fine on Ubuntu but CentOS explodes when using it. When using unique name, no good (Centos, but fine on Ubuntu); when using visible name, works fine.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.