Jump to content
  • 0

Q> About @costumeitem on script


Question

Posted

is it possible to make @costumeitem on script ? I am planning to make a costume headgear npc  quest. for example players want to make a costume hat. in my GM account i could make @costumeitem hat 1 . so how to put it on script npc ?

4 answers to this question

Recommended Posts

  • 0
Posted

use the 'atcommand' script command  /no1

*atcommand "<command>";

This command will run the given command line exactly as if it was typed in from 
the keyboard by the player connected to the invoking character, and that 
character belonged to an account which had GM level 99.

    // This will ask the invoker for a character name and then use the '@nuke'
    // GM command on them, killing them mercilessly.
    input @player$;
    atcommand "@nuke "+@player$;

Note that for atcommands bound using 'bindatcmd', this command will execute the
original atcommand, not the script-bound atcommand.
  • 0
Posted

 

use the 'atcommand' script command  /no1

*atcommand "<command>";

This command will run the given command line exactly as if it was typed in from 
the keyboard by the player connected to the invoking character, and that 
character belonged to an account which had GM level 99.

    // This will ask the invoker for a character name and then use the '@nuke'
    // GM command on them, killing them mercilessly.
    input @player$;
    atcommand "@nuke "+@player$;

Note that for atcommands bound using 'bindatcmd', this command will execute the
original atcommand, not the script-bound atcommand.

so for example 

if(countitem(7227) < 50 || countitem(720) < 500 || countitem(995) < 500) GOTO L_NOITEM;
 delitem 7227,50;
 delitem 720,500;
 delitem 995,500;
 atcommand "@costumeitem",getitem 5512,1;

is like this ?

btw im using eathena 

  • 0
Posted

@myiee
The correct syntax is:

if(countitem(7227) < 50 || countitem(720) < 500 || countitem(995) < 500) GOTO L_NOITEM;
delitem 7227,50;
delitem 720,500;
delitem 995,500;
atcommand "@costumeitem 5512 1"; // atcommand "@costumeitem <item_id> <item_amount>";

C ya!

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...