Jump to content
  • 0

HELP - Trying an equipment


MojoMojo

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

Im creating a NPC that let you try some headgers before buy them, just the image, not the effects.

How i could make this NPC make a player just try a headgear sprite? my intention is make the player try the visual. Just it.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

First, you need to store their current equipped headgear item ID

set .@old_helm, getequipid(1);

Use the command "rentitem" to give them an item for 15 seconds...

they would have plenty of time to view the item (and even show their calculated stats) but 15 seconds, should not give them enough time to actually make any use of the item...

http://rathena.org/w...?title=Rentitem

Use a menu system to select which helm to view...

OnViewHelm:
 rentitem <helm_id>, 15;
 equip <helm_id>;
 // return to menu

OnKeepItem:
 getitem <helm_id>, 1;

OnNevermind:
 equip .@old_helm;

very similar to that

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

But doesnt exist other way, that we don't have to give itens?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   6
  • Joined:  03/12/12
  • Last Seen:  

You could duplicate the code of @changelook and make it into a script command.

I do not condone the use of atcommands in scripts though, so I strongly don't recommend using simply @changelook on its own. Using atcommands in scripts = very bad.

Edit: Also, there is a command that is similar, setlook, but it persists through maps and re-logs unlike @changelook (actually, setlook lasts until the player switches equipment over the set position) so... I suggest either using Z3R0's hassle-less method or changing the src =P

Edited by Elliott
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...