Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-10-2009, 08:09 AM
coolman87 coolman87 is offline
Registered User
Join Date: Mar 2006
Posts: 3
coolman87 is on a distinguished road
Help please :[

okay so basically im trying to make a script and yeah i know theres alot of things that can be done to format better but i simplified it alot to try and find the problem, anyway i got the idea from zack on npulse and its just a "stamp" npc where you say /stamp account message and itll put a message by the player and follow them around.
so i put this in the weapon. I put an echo script and couldnt get it to echo so its not triggering but i dont know why.

PHP Code:
function onActionServerside() {
if (
params[0]=="stamp") {
echo(
params[0],params[1],params[2]);
findPlayer(params[1]).x=temp.x+1.5;
findPlayer(params[1]).y=temp.y+1.5;
serverr.stamp=params[2];
with (putnpc2(temp.xtemp.y"join soren_stamp;"))
{
  
this.follow_account params[0];
}
}
}
//#CLEINTSIDE
function onPlayerChats() {
t=player.chat.tokenize();
if (
t[0]=="/stamp") {
triggerServer("gui",name,"stamp",t[1],t[2]);
}
}

// and this in the class

function onCreated() {
this.chat=serverr.stamp;
settimer(.05);
}
function 
onTimeout() {
this.chat=serverr.stamp;
warpto(this.follow_account);
settimer(.05);


Last edited by Tigairius; 07-12-2009 at 07:07 AM.. Reason: Wrap your script in [php] tags. Read scripting forum rules before posting.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.