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
  #3  
Old 09-27-2001, 10:39 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
i was making things for fun like two days ago here is mine which involves another npc on duty...


Warper
Quote:
// NPC made by Merlin
//level warper
if (playerenters) {
toweapons Warper;
setgif shadoworb.gif;
}
if (weaponfired) {
say2 Say,#b
warpto x y levelname.graal#b
to warp.#b
-Merlin;
}
if (playerchats) {
tokenize #c;
if (tokenscount==4) {
if (onduty) {
this.x=strtofloat(#t(1));
this.y=strtofloat(#t(2));
setstring local.level,#t(3);
timeout = .5;
}
else{
setplayerprop #c,Go on duty before warping!;
}
}
}
if (timeout) {
setlevel2 #s(local.level),this.x,this.y;
}
On - duty

Quote:
// NPC made by Merlin
if (playertouchsme) {
toweapons Staff - Duty;
say2 This is the staff duty,#b
to use the staff weapons here#b
you must be 'on duty'#b
which means you need to have#b
your tag on and fire this weapon;
timeout = .5;
this.on = true;
}
if (weaponfired) {
if (strequals(#g,GP)||strequals(#g,Admin)||strequals( #g,SM)||strequals(#g,GP_Chief)||strequals(#a,Merli n)||strequals(#g,NPC_Admin)) {
if (this.on==false) {
setplayerprop #c, You are now on duty;
this.on = true;
set onduty;
}
else{
this.on = false;
setplayerprop #c,You are now off duty;
unset onduty;
}
}
}
if (timeout) {
timeout = 1;
if (this.on==true) {
if (!strequals(#g,GP)||!strequals(#g,Admin)||!strequa ls(#g,SM)||!strequals(#g,GP_Chief)||!strequals(#a, Merlin)||!strequals(#g,NPC_Admin)) {
this.on = false;
}
}
}
Reply With Quote
 

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 06:26 AM.


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