Quote Originally Posted by kaz210 View Post
Are you trying to make a graal server or..?
That was the original plan, but then I realized that I needed to pay €50 (~$60) a year to keep my server running. That means I'm paying money to HIM to create content to keep HIS app alive... I've seen scummy people before, but this takes the cake.
Quote Originally Posted by Grief Hero View Post
Uh, this should probably go in the subforum for NPC scripting.

Anyway, here's a basic script that'll get you started for your guard NPC.
 Spoiler
PHP Code:
//#CLIENTSIDE //This sets the character look

function onCreated() {
  
this.showCharacter();
  
this.head "head3.png";
  
this.body "body2.png";
  
this.attr[1] = "hat49.png";
  
this.dir 2;
  
this.firing false;
}
/*
This function is for when the player touches the NPC,
it'll show a message, and face the character.
In scheduleevent, after 5 seconds, it'll call the function to shoot
arrows at whatever direction it was pointing.

this.firing makes sure that you can't repeatedly touch the NPC to keep
it firing.

*/

function onPlayerTouchsMe() {
  if (
this.firing) return;
  
this.firing true;
  
say2("message here");
  switch (
player.dir) {
  case 
0:
    
this.dir 2;
    break;
  case 
1:
    
this.dir 3;
    break;
  case 
2:
    
this.dir 0;
    break;
  case 
3:
    
this.dir 1;
    break;
  }
  
scheduleevent(5"timeToRek");
}
/*With the for loop, the NPC will fire 6 arrows over a time
  of 3 seconds.

*/

function onTimeToRek() {
  for (
0<= 5i++) {
    
shootarrow(this.dir);
    
sleep(.5);
  }
  
this.firing false;




For your alignment assignment, I'm assuming you're talking about your AP.

You can do something like this to change it:

 Spoiler
PHP Code:
//#CLIENTSIDE

/*
  When the player touches the NPC, it'll assign a number between 0 and 100 as their AP.
  The int() is to round to the nearest integer. You can't set an AP with  decimal points.


*/
function onPlayerTouchsMe() {
  
player.ap int(random(0100));
}

function 
onCreated() {
  
this.showCharacter();
  
this.head "head3.png";
  
this.body "body2.png";
  
this.attr[1] = "hat49.png";
  
this.dir 2;
  
this.chat "Touch me to set a random AP!";


Oh, my god... Thank you!
For those two solutions, you can use a level NPC or class. You'll need to join the class to the NPC though.

To show a message on login, you could use a weapon/class/NPC script for it.
It could go something like this:
 Spoiler
PHP Code:
//#CLIENTSIDE
/*
When the player logins or enters a specific level, and their flag for the tutorial completion if false, it'll display a message.
You'll want to change that whenever they do finish the tutorial so it doesn't keep popping up.
*/
function onPlayerEnters() {
  if (!
clientr.tutorialCompleted) {
    
say2("blahblahblah");
  }

Thank you!

- - - Updated - - -

But if I may...

My alignment thing is kinda inspired by Ol' West's...

I'm trying to code for ~5 groups each with they're own AP levels... (For example

Hero (LL) AP: 0-3000
Hero (LM) AP: 3001-6000
Hero (LH) AP: 6001-9000
Hero (ML) 9001-12000
Hero (MM) 12001-15000
Hero (MH)15001-18000
Hero (HL)21001-24000
Hero (HM)24001-27000
Hero (HH)27001-30000

Also there are some proprieties:
-If a player kills someone with the same alignment as them, they'll he dropped down an AP level.
For example... If Bob (Hero (LH) 7509) kills another Hero, he'll immediately drop to Hero (LM) 3001
-If a player kills an enemy (like a giant spider or something) his AP will increase (+200)