Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-18-2001, 04:06 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Bot

I made this bot outline because i was bored and decided to post to learn from/ make fun off ;D etc etc so feel free to modifiy it, it's default.
//NPC Made by Merlin
if (created) {
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
this.loaded = true;
setcharprop #n,Default Bot;
setstring this.life,3;
timeout = .5;
}
if (timeout) {
message #s(this.life);
timeout=.5;
}
if (playertouchsme) {
if (playerdir==0) {
say2
Commands:#b
Shoot - Make Bot Shoot if loaded#b
Reload - Reload the bot's shot#b
Walk Up - walk up#b
Walk Down - walk down#b
Walk Left - walk left#b
Walk Right - walk right#b
Show Stats - Show the current Stats#b
of Bot#b
}
}
if (playerchats&&strequals(#c,show stats)) {
say2
Current Bot Stats:#b
Current bot life: #s(this.life)#b
}
if (playerchats&&strequals(#c,shoot)) {
if (this.loaded==true) {
setcharani shoot,;
shootarrow dir;
this.loaded = false;
}
}
if (playerchats&&strequals(#c,reload)) {
this.loaded = true;
}
if (playerchats&&strequals(#c,walk up)) {
walkup();
}
if (playerchats&&strequals(#c,walk down)) {
walkdown();
}
if (playerchats&&strequals(#c,walk left)) {
walkleft();
}
if (playerchats&&strequals(#c,walk right)) {
walkright();
}
function walkup() {
dir = 0;
setcharani walk,;
y=y-.5;
sleep.3;
y=y-.5;
sleep.3;
y=y-.5;
sleep.3;
y=y-.5;
sleep.3;
y=y-.5;
sleep.3;
y=y-.5;
sleep.3;
setcharani idle,;
}
function walkdown() {
dir = 2;
setcharani walk,;
y=y+.5;
sleep.3;
y=y+.5;
sleep.3;
y=y+.5;
sleep.3;
y=y+.5;
sleep.3;
y=y+.5;
sleep.3;
y=y+.5;
sleep.3;
setcharani idle,;
}
function walkleft() {
setcharani walk,;
dir = 1;
x=x-.5;
sleep.3;
x=x-.5;
sleep.3;
x=x-.5;
sleep.3;
x=x-.5;
sleep.3;
x=x-.5;
sleep.3;
x=x-.5;
sleep.3;
setcharani idle,;
}
function walkright() {
setcharani walk,;
dir = 3;
x=x+.5;
sleep.3;
x=x+.5;
sleep.3;
x=x+.5;
sleep.3;
x=x+.5;
sleep.3;
x=x+.5;
sleep.3;
x=x+.5;
sleep.3;
setcharani idle,;
}
if (washit) {
setstring this.life,#v(strtofloat(#s(this.life))-1);
timeout = .5;
}
if (wasshot) {
setstring this.life,#v(strtofloat(#s(this.life))-1);
timeout = .5;
}
if (timeout) {
if (strequals(#s(this.life),0)){
sprite = 40;
timeout = 1;
setstring this.life,3;
setcharani idle,;
timeout=.5;
}
}
if (timeout) {
if (strequals(#s(this.life),-1)){
setstring this.life,0;
}
}
if (timeout) {
if (strequals(#s(this.life),-2)){
setstring this.life,0;
}
}
if (timeout) {
if (strequals(#s(this.life),-3)){
setstring this.life,0;
}
}
if (timeout) {
if (strequals(#s(this.life),-4)){
setstring this.life,0;
}
}

Last edited by Merlin; 09-18-2001 at 05:03 AM..
Reply With Quote
  #2  
Old 09-18-2001, 04:14 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
wow thats nice, and that can be used on free PWs to cause it uses the ganis for free PWs right?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #3  
Old 09-18-2001, 04:45 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
yeah it only has single frame ganis but not just free because you can use anything on pay and just single on free so it can be used on either
Reply With Quote
  #4  
Old 09-18-2001, 04:53 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Sorry
Reply With Quote
  #5  
Old 09-18-2001, 04:55 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
ok there
Reply With Quote
  #6  
Old 09-18-2001, 05:01 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Reply With Quote
  #7  
Old 09-18-2001, 05:02 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
move is a great command
cant remember how i found it though
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #8  
Old 09-18-2001, 07:55 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
i dont like it
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #9  
Old 09-18-2001, 08:25 AM
Faheria_Admin5 Faheria_Admin5 is offline
Registered User
Join Date: Sep 2001
Posts: 70
Faheria_Admin5 is on a distinguished road
Send a message via AIM to Faheria_Admin5
Move is nice.
__________________

Reply With Quote
  #10  
Old 09-19-2001, 05:37 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Kaimetsu


Didn't take me long.
Oooo...Will you be my friend?? Ive been trying to figure out pathfinding for a bit now and its been giving me a proverbial headache...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
Reply


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 09:07 PM.


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