|
@@ -7870,8 +7870,8 @@ BUILDIN_FUNC(grouprandomitem) {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
-* makeitem <item id>,<amount>,"<map name>",<X>,<Y>;
|
|
|
-* makeitem "<item name>",<amount>,"<map name>",<X>,<Y>;
|
|
|
+* makeitem <item id>,<amount>,"<map name>",<X>,<Y>{,<canShowEffect>};
|
|
|
+* makeitem "<item name>",<amount>,"<map name>",<X>,<Y>{,<canShowEffect>};
|
|
|
*/
|
|
|
BUILDIN_FUNC(makeitem) {
|
|
|
t_itemid nameid;
|
|
@@ -7879,6 +7879,7 @@ BUILDIN_FUNC(makeitem) {
|
|
|
const char *mapname;
|
|
|
int m;
|
|
|
struct item item_tmp;
|
|
|
+ bool canShowEffect = false;
|
|
|
|
|
|
if( script_isstring(st, 2) ){
|
|
|
const char *name = script_getstr(st, 2);
|
|
@@ -7912,7 +7913,10 @@ BUILDIN_FUNC(makeitem) {
|
|
|
x = script_getnum(st,5);
|
|
|
y = script_getnum(st,6);
|
|
|
|
|
|
- if(strcmp(mapname,"this")==0) {
|
|
|
+ if (script_hasdata(st, 7))
|
|
|
+ canShowEffect = script_getnum(st, 7) != 0;
|
|
|
+
|
|
|
+ if (strcmp(mapname, "this")==0) {
|
|
|
TBL_PC *sd;
|
|
|
if (!script_rid2sd(sd))
|
|
|
return SCRIPT_CMD_SUCCESS; //Failed...
|
|
@@ -7927,16 +7931,16 @@ BUILDIN_FUNC(makeitem) {
|
|
|
else
|
|
|
item_tmp.identify = itemdb_isidentified(nameid);
|
|
|
|
|
|
- map_addflooritem(&item_tmp,amount,m,x,y,0,0,0,4,0);
|
|
|
+ map_addflooritem(&item_tmp, amount, m, x, y, 0, 0, 0, 4, 0, canShowEffect);
|
|
|
return SCRIPT_CMD_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * makeitem2 <item id>,<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
|
|
|
- * makeitem2 "<item name>",<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
|
|
|
+ * makeitem2 <item id>,<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<canShowEffect>};
|
|
|
+ * makeitem2 "<item name>",<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<canShowEffect>};
|
|
|
*
|
|
|
- * makeitem3 <item id>,<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>;
|
|
|
- * makeitem3 "<item name>",<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>;
|
|
|
+ * makeitem3 <item id>,<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<canShowEffect>};
|
|
|
+ * makeitem3 "<item name>",<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<canShowEffect>};
|
|
|
*/
|
|
|
BUILDIN_FUNC(makeitem2) {
|
|
|
t_itemid nameid;
|
|
@@ -7946,6 +7950,7 @@ BUILDIN_FUNC(makeitem2) {
|
|
|
struct item item_tmp;
|
|
|
struct item_data *id;
|
|
|
const char *funcname = script_getfuncname(st);
|
|
|
+ bool canShowEffect = false;
|
|
|
|
|
|
if( script_isstring( st, 2 ) ){
|
|
|
const char *name = script_getstr( st, 2 );
|
|
@@ -8013,9 +8018,20 @@ BUILDIN_FUNC(makeitem2) {
|
|
|
int res = script_getitem_randomoption(st, nullptr, &item_tmp, funcname, 14);
|
|
|
if (res != SCRIPT_CMD_SUCCESS)
|
|
|
return res;
|
|
|
+
|
|
|
+ if (script_hasdata(st, 17)) {
|
|
|
+ if (script_getnum(st, 17) != 0)
|
|
|
+ canShowEffect = script_getnum(st, 17) != 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (script_hasdata(st, 14)) {
|
|
|
+ if (script_getnum(st, 14) != 0)
|
|
|
+ canShowEffect = script_getnum(st, 14) != 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- map_addflooritem(&item_tmp,amount,m,x,y,0,0,0,4,0);
|
|
|
+ map_addflooritem(&item_tmp, amount, m, x, y, 0, 0, 0, 4, 0, canShowEffect);
|
|
|
}
|
|
|
else
|
|
|
return SCRIPT_CMD_FAILURE;
|
|
@@ -25332,8 +25348,8 @@ struct script_function buildin_func[] = {
|
|
|
BUILDIN_DEF(getitem2,"viiiiiiii?"),
|
|
|
BUILDIN_DEF(getnameditem,"vv"),
|
|
|
BUILDIN_DEF2(grouprandomitem,"groupranditem","i?"),
|
|
|
- BUILDIN_DEF(makeitem,"visii"),
|
|
|
- BUILDIN_DEF(makeitem2,"visiiiiiiiii"),
|
|
|
+ BUILDIN_DEF(makeitem,"visii?"),
|
|
|
+ BUILDIN_DEF(makeitem2,"visiiiiiiiii?"),
|
|
|
BUILDIN_DEF(delitem,"vi?"),
|
|
|
BUILDIN_DEF2(delitem,"storagedelitem","vi?"),
|
|
|
BUILDIN_DEF2(delitem,"guildstoragedelitem","vi?"),
|
|
@@ -25897,7 +25913,7 @@ struct script_function buildin_func[] = {
|
|
|
BUILDIN_DEF2(getitem2,"getitem3","viiiiiiiirrr?"),
|
|
|
BUILDIN_DEF2(getitem2,"getitembound3","viiiiiiiiirrr?"),
|
|
|
BUILDIN_DEF2(rentitem2,"rentitem3","viiiiiiiirrr?"),
|
|
|
- BUILDIN_DEF2(makeitem2,"makeitem3","visiiiiiiiiirrr"),
|
|
|
+ BUILDIN_DEF2(makeitem2,"makeitem3","visiiiiiiiiirrr?"),
|
|
|
BUILDIN_DEF2(delitem2,"delitem3","viiiiiiiirrr?"),
|
|
|
BUILDIN_DEF2(countitem,"countitem3","viiiiiiirrr?"),
|
|
|
|