Jump to content
  • 0

Learning/Improving


Question

Posted (edited)

Hello!

So far, ive made my scripts like: Take a ready script, costumize it, and have fun.

The Reason is there are a few important things, which i dont understand, so i hope, you guys can help me out with a short example npc.

What testing npc am i looking for is: 

An npc, positioning:   hu_fild03,249,171,3   with menu, 4 options to choose

 option 1: warps the player to prt_fild04 any coordinates

option 2: warps the player to a random map

option3: summons a random mvp, and heal,agi,bless the player.

option4: offers a quest item for a player, reward for quest: 18982 item ID, requirements for the quest:  619 5 piece,2168 2 piece, 5k zeny

 

I think, there are a lot of things in this scrip, so if you guys could help me out, i could experience the scripting by my own, i would really appreciate it!

Best Regards. :rolleyes:

Edited by Sunset
  • Upvote 1

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

This file is your best friend :D

Quote

 

 option 1: warps the player to prt_fild04 any coordinates

option 2: warps the player to a random map

option3: summons a random mvp, and heal,agi,bless the player.

option4: offers a quest item for a player, reward for quest: 18982 item ID, requirements for the quest:  619 5 piece,2168 2 piece, 5k zeny

1.

warp "prt_fild04 ",0,0;

2.

setarray .@maps$[0],"prt_fild01","prt_fild02","prt_fild03","prt_fild04";
warp .@maps$[rand(getarraysize(.@maps$))],0,0;

3.
setarray .@mvps[0],1086,1150,1511,1251;
monster "prt_fild04",0,0,"--ja--",.@mvps[rand(getarraysize(.@mvps))],1;
sc_start SC_INCREASEAGI,600000,10;		//AL_INCAGI#Increase AGI#
sc_start SC_BLESSING,600000,10;		//AL_BLESSING#Blessing#

4.
// Too lazy for a quest example, but you will find many examples in rathenas npc folder :)

 

Just remember: Keep on trying and improving your scripting skills. The above examples aren't very complex. You will find anything you need in doc/script_commands.txt :)

Edited by Jey
  • Upvote 1
  • 0
Posted
11 hours ago, Jey said:

https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

This file is your best friend :D


1.

warp "prt_fild04 ",0,0;

2.

setarray .@maps$[0],"prt_fild01","prt_fild02","prt_fild03","prt_fild04";
warp .@maps$[rand(getarraysize(.@maps$))],0,0;

3.
setarray .@mvps[0],1086,1150,1511,1251;
monster "prt_fild04",0,0,"--ja--",.@mvps[rand(getarraysize(.@mvps))],1;
sc_start SC_INCREASEAGI,600000,10;		//AL_INCAGI#Increase AGI#
sc_start SC_BLESSING,600000,10;		//AL_BLESSING#Blessing#

4.
// Too lazy for a quest example, but you will find many examples in rathenas npc folder :)

 

Just remember: Keep on trying and improving your scripting skills. The above examples aren't very complex. You will find anything you need in doc/script_commands.txt :)

Thank you, very much! :)

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