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;
}
}