View Single Post
  #6  
Old 01-24-2009, 06:19 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by cyan3 View Post
This is how it would work attached to an NPC.

PHP Code:
// NPC made by Felix Lionheart
if (created) {
  
showcharacter;
  
setcharprop #3,khead12.png;
  
setcharprop #n,Dude;
  
setcharprop #8,kmabody106.png;
  
setcharprop #P4,bshield23.png;
  
setcharprop #P(1),khairs33.png;
  
setcharprop #P(3),bsword28.png;
  
setcharprop #P(5),klegs33.png;
  
setcharprop #P(6),kmarms117.png;
  
setcharprop #P7,gk_cloak7.gif;
  
dir 2;
  
setcharani human2_sword_idle,;
  
ap 100;

function 
onPlayerTouchsMe() {
  
player.guild "Blue Team";
 }



I myself didn't get taught scripting by anyone. I researched the graal bible and other scripts to find the functions ect.
Don't put functions inside of other functions, even if you are mixing GS1 with GS2 it's bad practice.

PHP Code:
// NPC made by Felix Lionheart
if (created) {
  
showcharacter;
  
setcharprop #3,khead12.png;
  
setcharprop #n,Dude;
  
setcharprop #8,kmabody106.png;
  
setcharprop #P4,bshield23.png;
  
setcharprop #P(1),khairs33.png;
  
setcharprop #P(3),bsword28.png;
  
setcharprop #P(5),klegs33.png;
  
setcharprop #P(6),kmarms117.png;
  
setcharprop #P7,gk_cloak7.gif;
  
dir 2;
  
setcharani human2_sword_idle,;
  
ap 100;
}

function 
onPlayerTouchsMe() {
  
player.guild "Blue Team";

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote