Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-16-2004, 02:58 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Heh my bum bot, a class, decides to quit working after a while

Well my remote control bum works for a couple seconds(random short couple seconds), and im not sure why it just stops working. basically help.
NPC Code:

if (playerchats&&strequals(#c,/bum boom)&&strequals(#a,gman4pwnu)){
destroy;
}

if (created){
setshape 1,32,48;
}

if (actionmoveplace){
if (strequals(#p(0),up)){
dir=0;
setcharani walk,;
move 0,-.8,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),left)){
dir=1;
setcharani walk,;
move -.8,0,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),down)){
dir=2;
setcharani walk,;
move 0,.8,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),right)){
dir=3;
setcharani walk,;
move .8,0,.1,;
sleep .1;
setcharani idle,;
}
}

//#CLIENTSIDE
if (created) {
setshape 1,32,48;
showcharacter;
setcharprop #3,head13.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,white;
setcharprop #C4,lightgray;
setcharprop #n,Bum;
setcharprop #2,no-shield.gif;
shieldpower = 1;
dir = 2;
timeout=.05;
}

if (timeout){
if (strequals(#a,gman4pwnu)){
if (keydown(0)){
triggeraction x+.5,y+.5,moveplace,up;
} else
if (keydown(1)){
triggeraction x+.5,y+.5,moveplace,left;
} else
if (keydown(2)){
triggeraction x+.5,y+.5,moveplace,down;
} else
if (keydown(3)){
triggeraction x+.5,y+.5,moveplace,right;
}
}
timeout=.1;
}


 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:13 PM.


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