Skip to content

To generate ITEML string#14

Open
cydh wants to merge 11 commits into
masterfrom
feature/itemlink
Open

To generate ITEML string#14
cydh wants to merge 11 commits into
masterfrom
feature/itemlink

Conversation

@cydh

@cydh cydh commented Mar 24, 2019

Copy link
Copy Markdown
Owner
  • Addressed Issue(s):
  • Server Mode:
  • Description of Pull Request:

Desc

  • Added script command to generate string
    • itemlink(<item_id>{,<refine>,<card0>,<card1>,<card2>,<card3>});
    • itemlink2(<item_id>,<refine>,<card0>,<card1>,<card2>,<card3>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>);
      • NOTE that random option params must be filled even the server/client is not support if using itemlink2
    • base62_encode(<number>);
    • base62_decode("<string>");
    • Read the updated script_commands.txt for more details
  • Thanks to @lututui @exaxia @jchcc

Example script

prontera,155,155,3	script	itemlinktest#1	123,{
	npctalk "Knife [3] : "+itemlink(1202)+"";
	npctalk "+16 Knife [3] : "+itemlink(1202,16)+"";
	npctalk "+13 BXB Bapho+VR+EA2+EA1 : "+itemlink(18110,13,4147,4407,4833,4832)+"";
	setarray .@opt_ids[0],RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATTMPOWER,0,0;
	setarray .@opt_values[0],3,5,20,0,0;
	setarray .@opt_params[0],0,0,0,0,0;
	npctalk "+13 BXB Bapho+VR+EA2+EA1 + 3 Options : "+itemlink2(18110,13,4147,4407,4833,4832,.@opt_ids,.@opt_values,.@opt_params)+"";
	npctalk "Costume Tare Neko : "+itemlink(19544)+"";
	npctalk "Costume Uriel Wings : "+itemlink(20509)+"";
	end;
}

prontera,151,155,3	script	itemlinktest#2	123,{
	mes "Knife [3] : "+itemlink(1202)+"";
	mes "+16 Knife [3] : "+itemlink(1202,16)+"";
	mes "+13 BXB Bapho+VR+EA2+EA1 : "+itemlink(18110,13,4147,4407,4833,4832)+"";
	setarray .@opt_ids[0],RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATTMPOWER,0,0;
	setarray .@opt_values[0],3,5,20,0,0;
	setarray .@opt_params[0],0,0,0,0,0;
	mes "+13 BXB Bapho+VR+EA2+EA1 + 3 Options : "+itemlink2(18110,13,4147,4407,4833,4832,.@opt_ids,.@opt_values,.@opt_params)+"";
	mes "Costume Tare Neko : "+itemlink(19544)+" <ITEML>000001"+base62_encode(19544)+"</ITEML>";
	close;
}

Example result

Click the link below for image galery

cydh and others added 11 commits March 24, 2019 08:14
* Added script command to generate <ITEML> string, itemlink and itemlink2
  * itemlink(<item_id>{,<refine>,<card0>,<card1>,<card2>,<card3>});
  * itemlink2(<item_id>,<refine>,<card0>,<card1>,<card2>,<card3>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>);
    * NOTE that random option params must be filled even the server/client is not support if using itemlink2
* Thanks to @lututui @exaxia @jchcc
* Added equip location & view string in createItemLink result
* Added base62_encode and base62_decode script command
* Shouldn't be pushed
* Changed str loop in `base62_decode` to `std::string::iterator`
* Removed pre-defined base62 for nameid, equip, and look (just somehow failure on loading item_db on Travis-CI, worried on Linux too)
# Conflicts:
#	src/map/itemdb.cpp
#	src/map/itemdb.hpp
napatkung pushed a commit to napatkung/rathena that referenced this pull request Mar 1, 2023
* Corrected and implemented some item

Thanks to @Atemo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant