Jump to content
  • 0

@go @warp @storage item required


phebs

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   0
  • Joined:  09/13/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   0
  • Joined:  09/13/12
  • Last Seen:  

ill just edit it in atcommand.c right? and this commands can be use to @vend also?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   0
  • Joined:  09/13/12
  • Last Seen:  

thank you very much, do you know where i could change command for vending i cant find it in atcommand.. thank you again

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...