Thread: New Graal.Exe
View Single Post
  #29  
Old 10-01-2002, 04:24 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by emortylone
Still praying for NPC Server support, gets annoying having a beautiful script work 100% perfect offline, then realizing I fuxed up somewhere =/
---Shifter
Do what I do, while scripting online, believe you are scripting online. If you come up on something that needs to be online, script it, comment it out /* */ for now and use some debug command that simulates it working online.

Here is an example.

NPC Code:

if (playerenters) {
toweapons -test;
}

if (debugtest) {
setplayerprop #c, You sent a message to #I(clientr.debug,0);
sleep 2.4;
setplayerprop #c, Your message was: #I(clientr.debug,1);
}
/* BEGIN
if (actionserverside) {
with (getplayer(#p(0))) {
addstring clientr.messages,#p(1);
}
}
END */

//#CLIENTSIDE

if (playerchats && startswith(/send,#c)) {
for (this.i=0;this.i<weaponscount;this.i++) {
if (strequals(#w(this.i),-test)) {
this.index = this.i;
}
}
tokenize #c;
if (tokenscount>2 && strequals(#t(0),/send)) {
// triggeraction 0,0,serverside,-test,#t(1),#e(strlen(#t(1))+7,-1,#c);
setstring clientr.debug,#t(1),#e(strlen(#t(1))+7,-1,#c);
callweapon this.index,debugtest;

}
}

__________________
[signature]insert here[/signature]
Reply With Quote