
09-27-2001, 10:39 AM
|
|
Banned
|
 |
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
|
|
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;
}
}
}
|
|
|
|
|