'consumeitem' no longer requires npc_id to run. (bugreport:8563, credits: AnnieRuru)
Second part of the bug report is not yet fixed. http://rathena.org/board/tracker/issue-8563-consumeitem-doesnt-work-if-the-npc-id-is-0-example-bonus-script/ Replaced a few 'consumeitem' commands in scripts that were broken. Signed-off-by: Euphy <euphy.raliel@rathena.org>
This commit is contained in:
parent
8fff37eadc
commit
ad13f26fc2
@ -4537,6 +4537,8 @@ character. The character does not need to possess the item, and the item will
|
||||
not be deleted. While this command is intended for usable items, it will run
|
||||
for any item type.
|
||||
|
||||
This command does not currently work with the 'itemskill' script command.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*produce <item level>;
|
||||
|
@ -310,7 +310,8 @@ rachel,206,30,3 script Freya's Priest#play 920,{
|
||||
close2;
|
||||
set .@play,rand(1,10);
|
||||
if (.@play < 3)
|
||||
consumeitem 601; //Wing_Of_Fly
|
||||
//consumeitem 601; //Wing_Of_Fly
|
||||
warp "Random",0,0;
|
||||
else if (.@play < 5)
|
||||
consumeitem 12016; //Speed_Up_Potion
|
||||
else
|
||||
|
@ -13817,7 +13817,8 @@ OnTouch:
|
||||
set mao_morocc2,18;
|
||||
changequest 7026,7027;
|
||||
close2;
|
||||
consumeitem 602; //Wing_Of_Butterfly
|
||||
//consumeitem 602; //Wing_Of_Butterfly
|
||||
warp "SavePoint",0,0;
|
||||
end;
|
||||
}
|
||||
else if (mao_morocc2 == 19) {
|
||||
@ -13909,7 +13910,8 @@ que_dan02,115,53,3 script Man#moc2_crazyR01 456,{
|
||||
set mao_morocc2,20;
|
||||
changequest 7028,7029;
|
||||
close2;
|
||||
consumeitem 602; //Wing_Of_Butterfly
|
||||
//consumeitem 602; //Wing_Of_Butterfly
|
||||
warp "SavePoint",0,0;
|
||||
donpcevent "Mr. Kidd#moc_extra01::OnDisable";
|
||||
}
|
||||
else {
|
||||
|
@ -17717,13 +17717,11 @@ BUILDIN_FUNC(npcskill)
|
||||
*/
|
||||
BUILDIN_FUNC(consumeitem)
|
||||
{
|
||||
TBL_NPC *nd;
|
||||
TBL_PC *sd;
|
||||
struct script_data *data;
|
||||
struct item_data *item_data;
|
||||
|
||||
nullpo_retr( 1, ( sd = script_rid2sd( st ) ) );
|
||||
nullpo_retr( 1, ( nd = (TBL_NPC *)map_id2bl( sd->npc_id ) ) );
|
||||
|
||||
data = script_getdata( st, 2 );
|
||||
get_val( st, data );
|
||||
@ -17747,7 +17745,7 @@ BUILDIN_FUNC(consumeitem)
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
run_script( item_data->script, 0, sd->bl.id, nd->bl.id );
|
||||
run_script( item_data->script, 0, sd->bl.id, 0 );
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user