Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-29-2002, 06:46 AM
Cyber-X Cyber-X is offline
Registered User
Join Date: Nov 2001
Location: Brazil
Posts: 117
Cyber-X is on a distinguished road
Send a message via ICQ to Cyber-X Send a message via AIM to Cyber-X
Question Scripting with NPC Server offline!

How can I script a NPC to a p2p server that is not up yet??? What are the basic commands??? Like this... I want to script these NPCs to work in a p2p server... How can I do???

// NPC Made by CyberX
if(playerenters){
this.power=0;
}
if (actionlumbing) {
message #v(this.power)% done;
lumbpower = strtofloat(#p(0));
this.power +=lumbpower;
sleep 0.05;
putleaps 3,x+2,y;
}
if (this.power=100) {
message 100% done.;
putleaps 3,x,y;
putleaps 3,x+1,y;
putleaps 3,x+2,y;
putleaps 3,x+3,y;
putleaps 3,x+4,y;
sleep 0.05;
this.plus=1+strtofloat(#s(client.lumber));
setstring client.lumber,#v(this.plus);
say2 Total of wood: #s(client.lumber);
destroy;
}




and




// NPC made by CyberX
if (strtofloat(#s(client.lumber))>19) {
set wood1;
}
if (playertouchsme&&!wood1) {
say2 Not enough wood!;
}
if (playertouchsme&&wood1&&money1) {
say2 You've already gotten a
#bwoodpack!
}
if (playertouchsme&&w1) {
say2 You've already gotten a
#bwoodpack!
}
if (playertouchsme&&wood1&&!w1&&!w2&&!money1&&!money2 ) {
timeout = 1;
putleaps 3,x+2,y;
this.less=strtofloat(#s(client.lumber))-20;
setstring client.lumber,#v(this.less);
set w1;
freezeplayer 3;
}
if (timeout) {
putleaps 3,x+2,y;
}
__________________
 


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 03:08 AM.


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