Jump to content

utofaery

Members
  • Posts

    228
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by utofaery

  1. 6 hours ago, lllaaazzz said:

    2 Seems like any skill with knockback can move traps, i cant target them with autoattack on my server

    4 I dont like the code in @storeall, its misleading.... but im not an expert but maybe someone else can help you, I would suggest using :

    To make duplicates of your items and turn them back somehow but i dont know much beyond the basic when it comes to "scripting commands"

    5 I dont understand this question, are you saying, if you attack a poring, you dont know that its actually a water property mob until you look it up with rms or sense from wizz? This is part of the game  /meh For Cecil in particular you just gotta watch her hp cause at 70>40>10 she keeps changing 

    Thanks for 1 and 3.

    but for 2 .. I meant normal attack and skill attack for job gunslinger can't target any kind of trap at all while archer class can easily poke them out of existence aka kill all the trap they can target on by skill or normal attack.

     

    4.  I was thinking of getitem but instead of player getting the item,  cart / storage would get the item and not the player.

    so I was wondering if existance of such command is anywhere... 

    hence the auto storage of item with scripts if exist that kind of command...

    btw getitembound is almost like getitem with little difference but not what I wanted.

     

    5.

    I mean like on a case of normal attack 

    when player equipped certain bow which has the command script to detect the monster element.

    say a mob is neutral when attacked and it trigger attribute change

    and then it change element to say ghost

    then player arrow will auto switch to counter element arrow if exist depending on monster element.

    will this be source edit or item script only??

     

  2. Not the hercules one but this one..

    sorry for posting different code

     

    1 hour ago, utofaery said:

     

    
    /*==========================================
     * Does cast-time reductions based on dex, item bonuses and config setting
     *------------------------------------------*/
    int skill_castfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
    	double time = skill_get_cast(skill_id, skill_lv);
    
    	nullpo_ret(bl);
    
    	struct map_session_data *sd = BL_CAST(BL_PC, bl);
    	struct status_change *sc = status_get_sc(bl);
    	int reduce_cast_rate = 0;
    	uint8 flag = skill_get_castnodex(skill_id);
    
    	if(sd) {
    
    		if(sd->class_ & !MAPID_THIRDMASK) {
    			// Calculate base cast time (reduced by dex)
    			if (!(flag&1)) {
    
    				int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
    				if (scale > 0)	// not instant cast
    					time = time * (float)scale / battle_config.castrate_dex_scale;
    				else
    					return 0; // instant cast
    			}
    			if (!(flag&4) && sd->castrate != 100)
    				reduce_cast_rate += 100 - sd->castrate;
    			// Skill-specific reductions work regardless of flag
    			for (const auto &it : sd->skillcastrate) {
    				if (it.id == skill_id) {
    					time += time * it.val / 100;
    					break;
    				}
    			}
    			// These cast time reductions are processed even if the skill fails
    			if (sc && sc->count) {
    				// Magic Strings stacks additively with item bonuses
    				if (!(flag&2) && sc->data[SC_POEMBRAGI])
    					reduce_cast_rate += sc->data[SC_POEMBRAGI]->val2;
    				// Foresight halves the cast time, it does not stack additively
    				if (sc->data[SC_MEMORIZE]) {
    					if(!(flag&2))
    						time -= time * 50 / 100;
    					// Foresight counter gets reduced even if the skill is not affected by it
    					if ((--sc->data[SC_MEMORIZE]->val2) <= 0)
    						status_change_end(bl, SC_MEMORIZE, INVALID_TIMER);
    				}
    			}
                time = time * (1 - (float)reduce_cast_rate / 100);
    		}
    	}
    
    	// config cast time multiplier
    	if (battle_config.cast_rate != 100)
    		time = time * battle_config.cast_rate / 100;
    	// return final cast time
    	time = max(time, 0);
    	//ShowInfo("Castime castfix = %f\n",time);
    
    	return (int)time;
    }

     

     

  3. 1.

    Does cecil always change element?

     

    2. 
    How to make gunslinger can target traps and stuff? 
    because archer can normal attack / arrow shower to hit traps on grounds so it may be do able with gunslinger?

     

    3.
    how to massive clone object in browedit (in Group edit mode)?

     

    4.
    Is there a command to auto store item to storage apart from doing 
    atcommand "@storeall";
    would be great to use that kind of command to auto store item type and non-equiped item into storage...

    would there also be any command to move item of types into cart too??

     

    5.

    How to check monster's element which player attacked?

    Like auto detect in item script ?

  4. 15 hours ago, AnnieRuru said:

    never use "@reloadscript" on a live server

    use "@reloadnpc npc/zzz.txt"
    well, that's my default script file

     

    apparently Hercules doesn't have "@reloadnpc" ... hmm ....

    1

    So my only option in rathena would have to code in 

    "@reloadnpc npc/zzz.txt" inside an npc???  instead of easily @reloadscript?

     

    2

    Hercules is fluid to test source compiling and restarting server add with @reloadscript makes @reloadnpc not much of a matter if running on test server.

  5. 1 hour ago, Brizyous said:

    Yes, server wide.
    Nop, 3rd Jobs have to keep their cast as it is. 2nd jobs have to be able to reach instant cast at 150 dex with all their skills.

    I like the item script but its not practical, players would lose an item slot. What i want i saw it in other servers so i know its possible but i think is very difficult.

    n0tttt has given a little mistakes i think:

    ~ << this should be >> !

    Try the below one :  (and remember to recompile after you change anything in source)

    /*==========================================
     * Does cast-time reductions based on dex, item bonuses and config setting
     *------------------------------------------*/
    int skill_castfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
    	double time = skill_get_cast(skill_id, skill_lv);
    
    	nullpo_ret(bl);
    
    	struct map_session_data *sd = BL_CAST(BL_PC, bl);
    	struct status_change *sc = status_get_sc(bl);
    	int reduce_cast_rate = 0;
    	uint8 flag = skill_get_castnodex(skill_id);
    
    	if(sd) {
    
    		if(sd->class_ & !MAPID_THIRDMASK) {
    			// Calculate base cast time (reduced by dex)
    			if (!(flag&1)) {
    
    				int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
    				if (scale > 0)	// not instant cast
    					time = time * (float)scale / battle_config.castrate_dex_scale;
    				else
    					return 0; // instant cast
    			}
    			if (!(flag&4) && sd->castrate != 100)
    				reduce_cast_rate += 100 - sd->castrate;
    			// Skill-specific reductions work regardless of flag
    			for (const auto &it : sd->skillcastrate) {
    				if (it.id == skill_id) {
    					time += time * it.val / 100;
    					break;
    				}
    			}
    			// These cast time reductions are processed even if the skill fails
    			if (sc && sc->count) {
    				// Magic Strings stacks additively with item bonuses
    				if (!(flag&2) && sc->data[SC_POEMBRAGI])
    					reduce_cast_rate += sc->data[SC_POEMBRAGI]->val2;
    				// Foresight halves the cast time, it does not stack additively
    				if (sc->data[SC_MEMORIZE]) {
    					if(!(flag&2))
    						time -= time * 50 / 100;
    					// Foresight counter gets reduced even if the skill is not affected by it
    					if ((--sc->data[SC_MEMORIZE]->val2) <= 0)
    						status_change_end(bl, SC_MEMORIZE, INVALID_TIMER);
    				}
    			}
                time = time * (1 - (float)reduce_cast_rate / 100);
    		}
    	}
    
    	// config cast time multiplier
    	if (battle_config.cast_rate != 100)
    		time = time * battle_config.cast_rate / 100;
    	// return final cast time
    	time = max(time, 0);
    	//ShowInfo("Castime castfix = %f\n",time);
    
    	return (int)time;
    }

     

    This was tested working in hercules:

    Spoiler

    /*==========================================
     * Does cast-time reductions based on dex, item bonuses and config setting
     *------------------------------------------*/
    static int skill_castfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
    {
        int time = skill->get_cast(skill_id, skill_lv);

        nullpo_ret(bl);
    //xsa#ifndef RENEWAL_CAST
    //xsa    {
            struct map_session_data *sd;

            sd = BL_CAST(BL_PC, bl);
            if ( (sd)->job & !MAPID_THIRDMASK ) {//xsa
    //xsa        if(sd->class_ & ~MAPID_THIRDMASK) {//xsa
                // calculate base cast time (reduced by dex)
                if( !(skill->get_castnodex(skill_id, skill_lv)&1) ) {
                    int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
                    if( scale > 0 ) // not instant cast
                        time = time * scale / battle_config.castrate_dex_scale;
                    else
                        return 0; // instant cast
                }

                // calculate cast time reduced by item/card bonuses
                if( !(skill->get_castnodex(skill_id, skill_lv)&4) && sd )
                {
                    int i;
                    if( sd->castrate != 100 )
                        time = time * sd->castrate / 100;
                    for( i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast.id; i++ )
                    {
                        if( sd->skillcast.id == skill_id )
                        {
                            time+= time * sd->skillcast.val / 100;
                            break;
                        }
                    }
                }
            }//xsa
    //xsa    }
    //xsa#endif

        // config cast time multiplier
        if (battle_config.cast_rate != 100)
            time = time * battle_config.cast_rate / 100;
        // return final cast time
        time = max(time, 0);

        //ShowInfo("Castime castfix = %d\n",time);
        return time;
    }

     

  6. 18 minutes ago, M4karov said:

    I'm trying to learn how the emulator identifies water areas. And do something in that sense to be able to plant only where there is land, not to plant on sidewalks.

    checkcell("<map name>", <x>, <y>, <type>)

     

  7. 1 to 3 need source

    1. Is this for server wide?

    2. or is it specific for pvp map / gvg map only?

    3. not for 3rd job the insta cast?? if dex 150?

     

    this one is easier.

    4.  Alternatively you could create a custom item with the command to check for Thirdjob

    and give that custom item these two item script 

            bonus bVariableCastrate,-100;
            bonus bFixedCastrate,-100;

    and only give this custom item to non third job

  8. 5 minutes ago, M4karov said:

    I am creating a rainfall system that also influences harvest time. As for the plants, you will have a mapflag to define where the seed can be planted.

    I mean "Map Cell" not "Map"

    Map Cell  eg.. prontera,150,180

    Map eg.. Prontera

    2 different things

    it's like the vending script to limit which map cell can be vend upon and which cell are restricted from able to do so.

  9. 1

    Why not make menu only show card that is applicable for roll only??

    thus hiding all those not reach the amount required for a roll.

    then only able to choose one option (card) then next; then select to continue or not

     

  10. To answer this question:

    have a look in rudra bow...since you are making rudra bow

    and compare the view id in iteminfo.lua / iteminfo.lub

    Spoiler

        [1720] = {
            unidentifiedDisplayName = "Rudra Bow",
            ClassNum = 77

    Spoiler

        [1735] = {
            unidentifiedDisplayName = "Kkakkung",
            ClassNum = 11

    the only different between bow is ClassNum which is the view id!

    the item db is not in the business of view id ( which shows the weapon in game ) !!!

  11. Are you trying to create achievement by doing so?

    eg.  player used 500 ygg berry in 20 minutes? and get achievement "super weak tofu"???

    because the way you ask the question I simply thought that is what you meant

    the quotes below explain all info you may need to achieve in doing that.

    On 1/27/2019 at 2:56 AM, AnnieRuru said:

    healing item doesn't have unique ID, only equipment has
    there's no way to trace an item that can stack

    so to know which item used, just add something like

    
    501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ @itemuse = 501; itemheal rand(45,65),0; },{},{}

    on every single item

     

    or a source modification OnPCUseItemEvent ... seems its not floating in this forum

    Unless you are planing on doing something else?

  12. On 1/28/2019 at 7:23 PM, Lloyd said:

    Hi all.. 
    I have an error with rAthena, when i select my char on date 20170614 my launcher crash
    When i disable packet_obfuscation i have this error: [Warning]: clif_parse: Received unsupported packet (packet 0x05d3, 19 bytes received), disconnecting session #8.
    Any one has an idea please ? ?

    1.  Did you patch with disable packet encrytion AKA disable obfuscation (Green) in nemo ?

    or did you miss that out?

     

    packets.hpp

    2.

    //#define PACKET_OBFUSCATION           <<  Line 32: like this or without //

     

  13. 1. Check your item name

    2. Check if item directory and path is correct

    3. Pack them up as "Custom.grf"

    4. Make an entry of "Custom.grf" in your data.ini within your ragnarok folder

    5. Load your client test out

    6.  if all fails go to 

    https://github.com/rathena/rathena/wiki/Custom-Items

    and check the part says:

    allocating items on client side

    7.

    If all fails horribly go through the whole page again

    https://github.com/rathena/rathena/wiki/Custom-Items

  14. On 1/8/2019 at 9:02 PM, Althezier said:

    Hello! ?

    I have some general questions and I hope you guys can help me, here we go:

    I think that's it for now, thanks in advance guys!

    1. Into the Unknown ep (13.2)   Note:might be wrong!

    2. You gonna have a tons of work to do if you want renewal mob item npc in pre-Renewal server.

    3. asking and learning that's why this forum existed. 

    Manually learn to do things,  just like developing stuff... no automation apart from the tools mentions from post above.

    since I don't think rathena has a switch coded for moving renewal stuff (quest etc) directly into pre-renewal

    4.  Just clone from renewal database into prerenewal database that's all except for itemscript  and monster skill and npc script 

    Notepad plus ( mass replace or search) , Sublime 3 ( text editing programming ) , Beyond Compare(file and folder diff'ing)

    Visual studio 2017 community for compiling

    tortoise git for pulling git of rathena

    Grf Editor to view content of grf 

    while packing up with gf.exe (ancient grf tool)

     

     

    On a side note:

    Enjoy your stay here while tossing all your questions into support section or request section... 
    bright and kind person might be helping...

  15. 2 hours ago, AnnieRuru said:

    hmm ? you can't read the code I posted ?

    I don't understand source but only npc script..

     

    Questions:

    How to convert these lines to hercules script..since mainly played scripting in hercules 

    rathena database is a mess.

    		mes "map -> "+ mapid2name(.@unitdata[UMOB_MAPID]);
    		mes "X -> "+ .@unitdata[UMOB_X];
    		mes "Y -> "+ .@unitdata[UMOB_Y];
  16. Refined and can easily configured.

    -	script	Ragnarok#2	-1,{
    OnClock0135:
    OnClock0235:
    OnClock0335:
    OnClock0435:
    OnClock0535:
    OnClock0635:
    OnClock0735:
    OnClock0835:
    OnClock0935:
    OnClock1035:
    OnClock1135:
    OnClock1235:
    OnClock1335:
    OnClock1435:
    OnClock1535:
    OnClock1644:
    OnClock1735:
    OnClock1835:
    OnClock1935:
    OnClock2035:
    OnClock2135:
    OnClock2235:
    OnClock2335:
    OnClock0035:
    OnTest:
    	setarray .@MobName$[0],"Amon Ra","Atroce","White Lady","Baphomet","Dark Lord","Detardeurus","Doppelganger","Dracula","Drake","Eddga","Evil Snake Lord","Garm","Turtle General","Golden Thief Bug","Gopinich",",Incantation Samurai","Stormy Knight","Amon Ra","Lady Tanee","Lord of Death","Maya","Mistress","Moonlight Flower","Orc Hero","Orc Lord","Osiris","Pharaoh","Phreeoni","RSX-0806","Tao Gunka","Turtle General","Vesper";
    	setarray .@MobID[0],1511,1785,1630,1039,1272,1719,1046,1389,1112,1115,1418,1252,1312,1086,1885,1492,1251,1511,1688,1373,1147,1059,1150,1087,1190,1038,1157,1159,1623,1583,1312,1685;
    	.@mapName$ = "jawaii";
    	.@x = 0;
    	.@y = 0;
    	$Monsters_2 = getarraysize(.@mobName$);
    	announce (" .@mapName$ :: " + .@mapName$ + " .@x " + .@x + " .@y " + .@y ),bc_all;
    	announce (" mobname size :: " + getarraysize(.@MobName$) + " MobID size " + getarraysize(.@MobID) ),bc_all; 
    	announce "Se ha iniciado una Invasion en la Ciudad de Jawaii !!!!",bc_all;
    	for ( .@i = 0 ; .@i < getarraysize(.@mobName$); ++.@i) {
    		monster .@mapName$,.@x,.@y,.@mobName$[.@i],.@mobID[.@i],1,"Ragnarok#2::OnMyMobDead";
    	}
    	end;
    OnMyMobDead:
    	announce strcharinfo(0) + " has 1 RPs gained ",bc_all;
    	#RPs += 1;
    	$Monsters_2 -= 1;
    	if ($Monsters_2 > 0) {
    		announce "Felicidades " + strcharinfo(0) + " que mato al ultimo invasor que quedaba",bc_all,"008800";
    	} else {
    		announce "Queda " + $Monsters_2 + " monstruo en jawaii.",bc_all;
    	}
    	end;
    }
    
    
    jawaii,247,190,1	script	Hefesto#Jea1	813,{
    	mes "Bem Vindo";
    	mes "Hoje estamos vendendo diversos Conjuntos de Itens Especiais.";
    	next;
    	mes "Como você prefere pagar?";
    	if ( getgmlevel() >= 90 ) {
    		switch(select("RPs Point","RPs Shop","Test Event","Bye~")) {
    		case 1:
    			#RPs = #RPs + 1000;
    			dispbottom ( " #RPs :: " + #RPs ) ;
    			close2;
    			end;
    		case 2:
    			callshop "shop3#xJea",1;
    			end;
    		case 4:
    			close;
    		case 3:
    			close2;
    			donpcevent "Ragnarok#2::OnTest";
    			end;
    		}
    	}
    	if ( getgmlevel() < 90 ) {
    		switch(select("RPs Shop","Bye~")) {
    		case 1:
    			callshop "shop3#xJea",1;
    			end;
    		case 2:
    			close;
    		}
    	}
    }
    -	pointshop	shop3#xJea	-1,#RPs,4001:1

     

    • Like 1
×
×
  • Create New...