Jump to content

Capuche

Developer
  • Posts

    2,407
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by Capuche

  1. Note that the script doesn't identify properly the items with random option.

    How about identifyall command instead? https://github.com/rathena/rathena/blob/90d5b47025d07a78f52b82b9f58685efc97ed993/doc/script_commands.txt#L3037

    prontera,147,174,5	script	Identifier::identifier	402,{
    	[email protected] = 100;
    
    	[email protected] = identifyall(false);
    	if ([email protected]) {
    		message strcharinfo(0), "No identified items.";
    		end;
    	}
    	[email protected]_cost = [email protected] * [email protected];
    	if (Zeny < [email protected]_cost) {
    		message strcharinfo(0), "You need " + [email protected]_cost + " Zeny to identify the " + [email protected] + " items.";
    		end;
    	}
    	identifyall(true);
    	Zeny -= [email protected]_cost;
    	specialeffect2 154;
    	message strcharinfo(0), "Identify " + [email protected] + " items for " + [email protected]_cost + " Zeny.";
    	end;
    }
    
    paramk,102,60,6	duplicate(identifier)	Identifier	402

    The system is slightly different than the previous script though, this one doesn't identify the items one by one.

  2. 1 hour ago, utofaery said:

    have the command script got updated again???

    No.

     

    1 hour ago, utofaery said:

    It can run even without npc name?

    WTH is this nonsense.. the answer is literally in the link.

    • Love 1
  3. Did you change the setting of your second 'quest_shop' npc? The original script have been designed to call the datas of the shop through callfunc. If you didn't changed the 'Basic shop settings' just add your shop in the original quest_shop and call it with the function.

  4. No script command to retrieve the total parameter value like crazyarashi said, but you can create one

    /*==========================================
     * Returns a character's specified total stat.
     * readparam2 <param>;
     *------------------------------------------*/
    BUILDIN_FUNC(readparam2)
    {
    	TBL_PC *sd = NULL;
    	int value = 0, param_type = script_getnum(st, 2);
    
    	if (!script_rid2sd(sd)) {
    		script_pushint(st, -1);
    		return SCRIPT_CMD_FAILURE;
    	}
    	switch( param_type ) {
    	case 0:
    		value = sd->base_status.str;
    		break;
    	case 1:
    		value = sd->base_status.agi;
    		break;
    	case 2:
    		value = sd->base_status.vit;
    		break;
    	case 3:
    		value = sd->base_status.int_;
    		break;
    	case 4:
    		value = sd->base_status.dex;
    		break;
    	case 5:
    		value = sd->base_status.luk;
    		break;
    	default:
    		script_pushint(st, -1);
    		return SCRIPT_CMD_FAILURE;
    	}
    	script_pushint(st,value);
    	return SCRIPT_CMD_SUCCESS;
    }
    BUILDIN_DEF(readparam2,"i"),

    0 to 5 as parameter  to retrieve str agi vit int dex luk

    • Upvote 1
    • PC_NAME is hercules constant
    • strnpcinfo(0) should be used with addtimer instead of strnpcinfo(2)
    • you're searching the instance npc name of non-instance npc too
    • under oninstanceinit mf_loadevent is only set for non-instance map : this script is not running on instance map
    • Upvote 1
  5. Set your shop in

    // Script Core
    //============================================================
    -	script	quest_shop	-1,{ 

    Call the shop in

    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //============================================================
    prontera,164,203,6	script	Quest Shop#1	998,{ callfunc "qshop"; }			// call all shop
    prontera,164,203,6	script	Quest Shop#1	998,{ callfunc "qshop",1; }			// call shop number 1
    prontera,164,203,6	script	Quest Shop#1	998,{ callfunc "qshop",1,2; }		// call shop number 1 and 2

     

  6. warpparty command?

    *warpparty "<to_mapname>",<x>,<y>,<party_id>,{"<from_mapname>",<range x>,<range y>};
    
    Warps a party to specified map and coordinate given the party ID, which you can get with
    getcharid(1). You can also request another party id given a member's name with getcharid(1,<player_name>).
    
    You can use the following "map names" for special warping behavior:
    Random:       All party members are randomly warped in their current map (as if they
                  all used a fly wing)
    SavePointAll: All party members are warped to their respective save point.
    SavePoint:    All party members are warped to the save point of the currently
                  attached player (will fail if there's no player attached).
    Leader:       All party members are warped to the leader's position. The leader must
                  be online and in the current map-server for this to work.
    
    If you specify a from_mapname, 'warpparty' will only affect those on that map.
    
    The <range x> and <range y> optional values allow for a randomization with the
    player's warp point. The values will randomly add or subtract from the given <x>
    and <y> coordinates.

     

×
×
  • Create New...

Important Information

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