Jump to content
  • 0

How to ... ? Some question about scripting


Onnyx

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  07/22/13
  • Last Seen:  

Hello,

I wanted to know if it was possible, with a script:

- How to make a script to work from the start of the server?

- How to make an image appear over a player (like emblem in WoE)?

- How to equip the item only if it the player has a skill ? (eg with Sword -> Sword Mastery)

- And how to put multiple scripts in a single weapon? (eg A script when it is equipped and B script when unequipped)

Is this possible, and if so, how?

Thank you for your help

Sincerely, Onnyx

Edited by Onnyx
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Im really new to scripting but i got a lil information to spare.

Q: How to make a script to work from the start of the server?

A: There are vary of options you can choose,
          ex:
OnPCLoginEvent: = When a char Log in

          ex: mapname,x,y,z,<TAB>script<TAB>scriptname<TAB>spriteid,{   = NPC

 

Q: How to make an image appear over a player (like emblem in WoE)?

A: Probably src editing or, playing special effects attaching in the player.

 

Q; How to equip the item only if it the player has a skill ? (eg with Sword -> Sword Mastery)

A: I only know, if( BaseClass == Job_"JOB" ) atm.

 

Q: - And how to put multiple scripts in a single weapon? (eg A script when it is equipped and B script when unequipped)

A:  {  bonus bAllstats,10; },{ equip 1202; },{ unequip 1202; atcommand "@die"; }

                     { Script },  { OnEquip_Script },      { OnUnequip_Script }

Hope more advance and pro scripter help give you more info.
 

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

- How to make a script to work from the start of the server?

Answer : Put your script on trunk/npc/ folder and and specify the path of your script on your trunk/npc/scripts_custom.conf
- How to make an image appear over a player (like emblem in WoE)?

Answer : Source 
- How to equip the item only if it the player has a skill ? (eg with Sword -> Sword Mastery)

Answer : 

if ( !getskilllv("SM_SWORD") ) 
// unequip the item

- And how to put multiple scripts in a single weapon? (eg A script when it is equipped and B script when unequipped)

Answer : 

trunk/db/re/item_db.txt

// Structure of Database:
// ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script }
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

A very precise answer sir patskie.
Thanks sir patskie for another useful information!

- How to equip the item only if it the player has a skill ? (eg with Sword -> Sword Mastery)

if ( !getskilllv("SM_SWORD") ) 
// unequip the item

Im really waiting for someone who can answer that question, because i want to know that too. :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  07/22/13
  • Last Seen:  

Thank you Lil Troll and Patskie for your answer =)

If I can find the solution for an image over a player, I send that =)

Good day, and thank you

Onnyx

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