phebs Posted September 13, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 57 Reputation: 0 Joined: 09/13/12 Last Seen: November 18, 2013 Share Posted September 13, 2012 example if you use @go/warp/storage command you need a item first example 501 Red Potions i hope you understand me hehehe thank you Quote Link to comment Share on other sites More sharing options...
lekkereten Posted September 13, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 148 Reputation: 46 Joined: 11/02/11 Last Seen: November 25, 2024 Share Posted September 13, 2012 You can do something like this: http://pastebin.com/QF5ZxvAG And the @storage command would be: http://pastebin.com/r48ynwUA If you want the amount of item do be deleted after using the command, you can add this line: if (found) pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND); I tested here and it is working. Quote Link to comment Share on other sites More sharing options...
phebs Posted September 13, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 57 Reputation: 0 Joined: 09/13/12 Last Seen: November 18, 2013 Author Share Posted September 13, 2012 ill just edit it in atcommand.c right? and this commands can be use to @vend also? Quote Link to comment Share on other sites More sharing options...
lekkereten Posted September 13, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 148 Reputation: 46 Joined: 11/02/11 Last Seen: November 25, 2024 Share Posted September 13, 2012 Yeah. They can be used with pretty much all atcommands. But you have to put the code in a place before the command itself is executed. On @storage, for example, the line that open the storage is this one: if (storage_storageopen(sd) == 1) So I had to put the verification code before that, so it'll check for the items before open the storage. Quote Link to comment Share on other sites More sharing options...
phebs Posted September 13, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 57 Reputation: 0 Joined: 09/13/12 Last Seen: November 18, 2013 Author Share Posted September 13, 2012 thank you very much, do you know where i could change command for vending i cant find it in atcommand.. thank you again Quote Link to comment Share on other sites More sharing options...
lekkereten Posted September 13, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 148 Reputation: 46 Joined: 11/02/11 Last Seen: November 25, 2024 Share Posted September 13, 2012 Go to src/map/vending.c and find this function: void vending_openvending(struct map_session_data* sd, const char* message, bool flag, const uint8* data, int count) { And then put the code before this line: vending_skill_lvl = pc_checkskill(sd, MC_VENDING); Also, find this line int the code I sent you: sprintf(atcmd_output, "You need %dx %s in order to use this command", item_qty_req, itemdb_jname(item_id_req)); Add this before: char atcmd_output[150]; Then I think it'll work, didn't test though. 1 Quote Link to comment Share on other sites More sharing options...
Question
phebs
example if you use @go/warp/storage command
you need a item first example 501 Red Potions
i hope you understand me hehehe thank you
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.