Jump to content
  • 0

[Request] If the item is in your inventory


Dissidia

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

if the item is in your inventory, you can use teleport level 2. it is possible? not equiping.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

Do you mean when I have Teleport Clip in my inventory I will learn Teleport Skill?

I believe its going to be SRC editting.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  967
  • Reputation:   53
  • Joined:  11/13/11
  • Last Seen:  

if( countitem(ITEM) == 1 ) { skill "AL_TELEPORT",1; }

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Well,..there is 2 way to do this as i know so far...

1 is Source Editing and the other is by Normal NPC Scripting...

but i dont think Normal NPC Scripting would work better than Source Editing...

For Nomal NPC Scripting...you can make use of these Scripts...

*skill <skill id>,<level>{,<flag>};

*skill "<skill name>",<level>{,<flag>};

*addtoskill <skill id>,<level>{,<flag>};

*addtoskill "<skill name>",<level>{,<flag>};


These commands will give the invoking character a specified skill. This is also
used for item scripts.

Level is obvious. Skill id is the ID number of the skill in question as per
'db/skill_db.txt'. It is not known for certain whether this can be used to give
a character a monster's skill, but you're welcome to try with the numbers given
in 'db/mob_skill_db.txt'.

Flag is 0 if the skill is given permanently (will get written with the character
data) or 1 if it is temporary (will be lost eventually, this is meant for card
item scripts usage.).  The flag parameter is optional, and defaults to 1 in
'skill' and to 2 in 'addtoskill'.

Flag 2 means that the level parameter is to be interpreted as a stackable
additional bonus to the skill level. If the character did not have that skill
previously, they will now at 0+the level given.

// This will permanently give the character Stone Throw (TF_THROWSTONE,152), at
// level 1.
skill 152,1,0;

For Example :

- script Sample -1,{
OnPCLoginEvent:
if( countitem( 7539 ) ){
skill 26,2,1;
dispbottom "Level 1 Teleport Skill added.";
addtimer 10000,strnpcinfo(0)+"::OnPCLoginEvent";
}else{
skill 26,0,1;
addtimer 10000,strnpcinfo(0)+"::OnPCLoginEvent";
}end;
}

this script will give players the Teleport Skills upon they login and they have the items with them...

i added the time for checking..which will keep check for the items existance every 10 seconds.

Problems : It might caused heavy load if your server population is high....due to the time checking...

Edited by Emistry
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  221
  • Reputation:   12
  • Joined:  12/18/11
  • Last Seen:  

if( countitem(ITEM) == 1 ) { skill "AL_TELEPORT",1; }

Would be { skill "AL_TELEPORT",2; } for level two xD

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...