Jump to content
  • 0

How to ... ? Some question about scripting


Question

Posted (edited)

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

4 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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

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

Posted (edited)

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

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