Hello,
I am using an item with a callfunc attached to it, it is like a in-game database system. Its really simply but I like the way it turned out.
Sadly there are 2 problems.
1) It searches for japanese name, this is how i want it but if the item does not exist the search box still appears but with all values set to zero. I know a check can be easily be done if i make it search for ID but is it also possible with name?
2) It only shows one result but in RO there are several items with the same name. Take Flapping Angel Wing for example, there are two of those but only one shows up. Is there a way to make all options show in the dialogue?
Sorry if this is a impossible script but thanks so much for trying nonetheless. ^^
I am using an item with a callfunc attached to it, it is like a in-game database system. Its really simply but I like the way it turned out.
Sadly there are 2 problems.
1) It searches for japanese name, this is how i want it but if the item does not exist the search box still appears but with all values set to zero. I know a check can be easily be done if i make it search for ID but is it also possible with name?
2) It only shows one result but in RO there are several items with the same name. Take Flapping Angel Wing for example, there are two of those but only one shows up. Is there a way to make all options show in the dialogue?
Sorry if this is a impossible script but thanks so much for trying nonetheless. ^^
Code:
L_Item:next;dispbottom "Initiating Item Database...";progressbar "0xRRGGBB",2;mes "Database successfully loaded. What Item do you want to learn about?:";mes " ";mes "Please ^ff0000only input the Item's full name^000000 or there will be incorrect results!";input .@itemname$;query_sql "SELECT ID, price_buy, price_sell, weight, atk, defence, slots FROM item_db WHERE name_japanese = '"+ escape_sql(.@itemname$) +"'", @iid$, .@buy, .@sell, .@weight, .@atk, .@defence, .@slots; if(getiteminfo(.@itemnum, 0) == -1) // item does not exist next; mes "Name: "+.@itemname$; mes "Weight: "+.@weight; mes "ATK: "+.@atk; mes "DEF: "+.@defence; mes "Slots: "+.@slots; mes "Buying Price: "+.@buy; mes "Selling Price: "+.@sell; next; goto L_menu2; L_menu2:menu "Which monster drops it?",-,"Search for another item",L_Item,"Exit",L_later2; atcommand "@whodrops "+@iid$;goto L_menu2; L_later2: close; }
Last edited by a moderator: