Jump to content
  • 0

Scripting for Dummies


Question

Posted (edited)

* Request * Do Not Post These Links on eAthena.ws // Paradox has made it quite clear that he thinks we are attacking his server with a ddos attempts, and I feel the need to disperse from there entirely now.

Few Small Samples from eAthenaTutorials (Youtube Account Me and Any Other Video Developers Would Like to Host On)

I apologize if my voice sounds bad ( Allergies are kicking my ass )

NPC Scripting for Dummies (Audio / Video Tutorial)

Please Note, Everything is in Spoiler Tags to Prevent Super Page Stretching

The Curriculum:

Chapter 1: The Basics - Complete

Chapter 2: Variables - Complete

Chapter 3: Debugging - Complete

Chapter 4: Basic Menu System

Chapter 5: Math - Complete (Possibly Redo -- THANKS JGUY!!!!GRRRR)

Chapter 6: Logic

Chapter 7: Player Input

input

Chapter 8: Loops

goto loop

for

while

do while

Chapter 9: Arrays

Array Explanation

setarray

getarraysize

Array Functions (copyarray, delarray, cleararray)

Looping Through Array

Limitations (Variable Scoping)

Chapter 10: Advanced Menu System

select

prompt

Chapter 11: Functions

inline functions

global functions

Chapter 12: Events

OnInit

OnPCLogout

OnPCLogin

OnTouch

OnTimer####

OnClock####

List of Others

Chapter 13: NPC Attachment

attachrid

detachrid

getcharid

Chapter 14: Instances

create instance

working with instance variables

working with instance maps

Chapter 15: Further Reading

scripting documentation

iFoxKun's Text Follow Through of These Tutorials

Chapter 16: Final Touch

Working Quest NPC (3 NPC Quest Script)

Working Item Exchanger (1 NPC, Multiple Items)

Working Instance

Chapter 17: Custom - Requested Advice

N/A

Edited by Z3R0
Added Curriculum
  • Upvote 5
  • MVP 1

Recommended Posts

  • 0
Posted (edited)
I suggest : How to comment the code .

both way also can prevent the code from running..

This 1 we usually use when come to "Disable" multiple line

/* Part that Doesnt Run */

Just for 1 or several line usually.......

// Line that Doesnt Run

LOL i messed up with C Programming =='' ~

Edited by Emistry
  • 0
Posted

To be sure . I'm looking to find the way to comment in 'src/map/script.c' . I think we can use block comment. ;)

const char* skip_space(const char* p)
{
if( p == NULL )
 return NULL;
for(;
{
 while( ISSPACE(*p) )
  ++p;
 if( *p == '/' && p[1] == '/' )
 {// line comment
  while(*p && *p!='n')
   ++p;
 }
 else if( *p == '/' && p[1] == '*' )
 {// block comment
  p += 2;
  for(;
  {
   if( *p == '0' )
 return p;//disp_error_message("script:skip_space: end of file while parsing block comment. expected "CL_BOLD"*/"CL_NORM, p);
   if( *p == '*' && p[1] == '/' )
   {// end of block comment
 p += 2;
 break;
   }
   ++p;
  }
 }
 else
  break;
}
return p;
}

  • Upvote 1
  • 0
Posted (edited)

block comment like this:

/*

*/

I think you could always do that with the code. And yeah I already used it many times. It's very helpful.

Edited by Judas
  • 0
Posted

ya, ok I thought it was a recent addition... lol, been doing this for a while now, never knew about block commenting and no script I've ever seen used it

  • 0
Posted

That's the plan. I apologize for not being able to do anything lately... I am currently undergoing pc maintenance on my laptop ;)

  • 0
Posted

Sorry there hasn't been much dev on this lately guys... my laptops been in shambles...I should be able to do more this weekend :D

  • 0
Posted

I've been out of the RO scene/Scripting scene for a very long time and these videos are really helpful as a refresher. They're really easy to understand.

I'm hoping to see this whole thing through. Keep up the good work!

Couple of suggestions:

- mes command has been updated.

To display multiple lines of message while only using a single mes; command,
use the script command in the following format:

mes "Line 1", "Line 2", "Line 3";

This will display 3 different lines while only consuming a single line in
the relevant script file.

http://sourceforge.net/apps/trac/rathena/changeset/15072/

- I feel that changing the color of the text in game inside an NPC window should be covered as an extension of some sort to Chapter 1. It's something basic.

- Terms that could be defined as I'm assuming not everyone knows it

-- String

-- Integer

- I think you should speak up more if not just increase the gain on your microphone settings. I have to set the volume of my computer to the max in order to hear you clearly. =/

I'm considering replacing the basic scripting guide in the wiki with a transcripted version of this series.

  • 0
Posted

Ok, will definitely work on that, unfortunately, speaking louder is not an option, due to my 2 year old sleeping, however I will look into the increase of gain...

  • Upvote 1
  • 0
Posted

Sorry guys, wasn't able to get any laptop time in this weekend... I apologize... I swear I'll have some more by the end of the week though /no1

  • 0
Posted

LOL...Dont mind it...take your time...^^ All we have here....is TIME !! haha ~

still a long way to go...no need to push yourself so hardly...

  • 0
Posted

Wow thank you for posting this. I have been wanting to learn more about scripting so I can be more useful Quite the comprehensive guide! ... and videos! You're awesome, Z3R0!

  • 0
Posted

It's great in the first place that you are dedicating some time to make and post these videos. You've been a great support for several of the members here =D!

You don't have to rush such projects. In fact, for these kinds of videos, you have to take time ;D and explain clearly to avoid any confusion.

You are doing great <3!

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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