Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-16-2005, 05:32 PM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
Admin Tool

ok i tested this script out and itstill wont work so please some one help me out in this one


npc script

if (actionserverside){
savelog2 stafftools.txt,#a has used the command #t(0);
tokenize #p(0);
if (strequals(#t(0),allpm)) {
sendpm #t(1);
}
elseif (strequals(#t(0),pm)) {
with (getplayer(#t(1))){
sendpm #t(2);
}
}
elseif (strequals(#t(0),rcchat)) {
setstring this.nick,#n;
sendtonc #s(this.nick): #t(1);
}
elseif (strequals(#t(0),nick)) {
with (getplayer(#t(1))){
setplayerprop #n,#t(2);
}
}
elseif (strequals(#t(0),guild)) {
with(getplayer(#t(1))){
setplayerprop #g,#t(2);
}
}
elseif (strequals(#t(0),setallnick)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setplayerprop #n,#t(1);
}
}
}
elseif (strequals(#t(0),setnick)) {
setplayerprop #n,#t(1);
}
elseif (strequals(#t(0),setguild)) {
setplayerprop #g,#t(1);
}
elseif (strequals(#t(0),setallguild)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setplayerprop #g,#t(1);
}
}
}
elseif (strequals(#t(0),head)) {
with(getplayer(#t(1))){
setplayerprop #3,#t(2);
}
}
elseif (strequals(#t(0),hat)) {
with(getplayer(#t(1))){
if (!strequals(#F,)) {
setplayerprop #P1,#t(2);
}
}
}
elseif (strequals(#t(0),rchead)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
if (strequals(#a,#t(1))) {
if (strequals(#F,)) {
setplayerprop #3,#t(2);
}
}
}
}
}
elseif (strequals(#t(0),allrchead)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
if (strequals(#F,)) {
setplayerprop #3,#t(1);
}
}
}
}
elseif (strequals(#t(0),arrows)) {
with(getplayer(#t(1))){
playerdarts=strtofloat(#t(2));
}
}
elseif (strequals(#t(0),bombs)) {
with(getplayer(#t(1))){
playerbombs=strtofloat(#t(2));
}
}
elseif (strequals(#t(0),allheal)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setstring client.hp,1000;
}
}
}
elseif (strequals(#t(0),allgani)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setani #t(1),;
}
}
}
elseif (strequals(#t(0),gani)) {
with(getplayer(#t(1))) {
setani #t(2),;
}
}
elseif (strequals(#t(0),ap)) {
if (tokenscount==3) {
with(getplayer(#t(1))) {
playerap=strtofloat(#t(2));
}
}
else if (tokenscount==2) {
playerap=strtofloat(#t(1));
}
}
elseif (strequals(#t(0),allap)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
playerap=strtofloat(#t(1));
}
}
}
elseif (strequals(#t(0),mp)) {
with(getplayer(#t(1))) {
playermp=strtofloat(#t(2));
}
}
elseif (strequals(#t(0),allmp)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
playermp=strtofloat(#t(1));
}
}
}
elseif (strequals(#t(0),addweapon)) {
if(tokenscount==3) {
with(getplayer(#t(1))) {
addweapon #t(2);
if(hasweapon(#t(2))) {
setplayerprop #c, Successfully recieved: #t(2);
}
}
}
else if(tokenscount==2) {
addweapon #t(1);
}
}
elseif (strequals(#t(0),delweapon)) {
if(tokenscount==3) {
with(getplayer(#t(1))) {
removeweapon #t(2);
if(!hasweapon(#t(2))) {
setplayerprop #c, Successfully removed: #t(2);
}
}
}
else if(tokenscount==2) {
removeweapon #t(1);
}
}
elseif (strequals(#t(0),heal)) {
with(getplayer(#t(1))) {
setstring client.hp,1000;
setstring client.mp,10000;
}
}
elseif (strequals(#t(0),freeze)) {
with(getplayer(#t(1))){
freezeplayer2;
}
}
elseif (strequals(#t(0),unfreeze)) {
with(getplayer(#t(1))){
unfreezeplayer;

}
}
elseif (strequals(#t(0),warpto)) {
with (getplayer(#a)) {
setlevel2 #t(1),strtofloat(#t(2)),strtofloat(#t(3));
}
}
elseif (strequals(#t(0),warp)) {
with (getplayer(#t(1))) {
setlevel2 #t(2),strtofloat(#t(3)),strtofloat(#t(4));
}
}
elseif (strequals(#t(0),allwarp)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setlevel2 #t(1),strtofloat(#t(2)),strtofloat(#t(3));
}
}
}
elseif (strequals(#t(0),say)) {
with (getplayer(#t(1))) {
say2 #t(2);
}
}
elseif (strequals(#t(0),allsay)) {
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
say2 #t(1);
}
}
}
elseif (strequals(#t(0),pk)) {
if(!strcontains(#s(this.allowed),#t(1))) {
with(getplayer(#t(1))) {
setstring client.hp,0;
}
}
}

if (strequals(#t(0),rupees)) {
with(getplayer(#t(1))) {
playerrupees=strtofloat(#t(2));
}
}

elseif (strequals(#t(0),allmsg)) {
for (j=0;j<allplayerscount;j++) {
with (allplayers[j]){
setplayerprop #c,#t(1);
}
}
}
elseif (strequals(#t(0),summon)) {
tokenize #c;
this.x = playerx;
this.y = playery;
setstring this.level,#L;
with(getplayer(#t(1))) setlevel2 #s(this.level),this.x,this.y;
}
elseif (strequals(#t(0),summonall)) {
tokenize #c;
this.x = playerx;
this.y = playery;
setstring this.level,#L;
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]){
setlevel2 #s(this.level),this.x,this.y;
}
}
}
elseif (strequals(#t(0),msg)) {
with (getplayer(#t(1))) {
setplayerprop #c,#t(2);
}
}
}

if(strequals(#p(0),jail)){
savelog2 StaffTools.txt,#a jailed #p(1)#K(13);
sendtorc #a jailed #p(1),Remember to set comments.;
with (getnpc(Control-NPC)) {
addstring this.jailed,#p(1);
}
with(getplayer(#p(1))) {
disableweapons;
setstring client.jailed,true;
setplayerprop #n,*Jailed;
setlevel2 jail.nw,31,26;
}
}
if (strequals(#p(0),unjail)) {
savelog2 StaffTools.txt,#a unjailed #p(1)#K(13);
sendtorc #a unjailed #p(1), Remember to remove the comments of jailing.;
with (getnpc(Control-NPC)) {
removestring this.jailed,#p(1);
}
with (getplayer(#p(1))) {
enableweapons;
setplayerprop #a,;
removestring client.jailed,true;
setlevel2 rc-cafe.nw,30,30;
setplayerprop #n,#a;
}
}


//#CLIENTSIDE
if (playerchats){
if (startswith(/,#c)) {
tokenize #c;
triggeraction 0,0,serverside,#w,#e(1,-1,#c);
}
elseif (strequals(#c,Enable Weapons)){
enableweapons;
}
elseif (strequals(#c,/+y)) {playery+=1;}
elseif (strequals(#c,/-y)) {playery-=1;}
elseif (strequals(#c,/+x)) {playerx+=1;}
elseif (strequals(#c,/-x)) {playerx-=1;}
}
if (weaponfired) {
say2 Staff Commands:
#b/allpm <message>
#b/pm <acc> <message>
#b/nick <acc> <gld>
#b/guild <acct> "<guild>"
#b/setnick "<nick> <guild>"
#b/setguild "<guild>"
#b/setallnick "<nick>"
#b/setallguild "<guild>"
#b/head <acc> <playerhead>
#b/hat <acc> <playerhat>
#b/rchead <acc> <rchead>
#b/allrchead <rchead>
#b/arrows <acc> <amount>
#b/bombs <acc> <amount>
#b/allheal
#b/allgani <gani>
#b/gani <acc> <gani>
#b/ap <acc> <amount>
#b/allap <amount>
#b/mp <acc> <amount>
#b/allmp <amount>
#b/addweapon <acc> <weaponname>
#b/delweapon <acc> <weaponname>
#b/heal <acc>
#b/freeze <acc>
#b/unfreeze <acc>
#b/warpto <lvl> <x> <y>
#b/warp <acc> <lvl> <x> <y>
#b/allwarp <lvl> <x> <y>
#b/say <acc> <message>
#b/rcchat <message>
#b/allsay <message>
#b/pk <acc>
#b/rupees <acc> <amount>
#b/summon <acc>
#b/msg <acc> <message>
#b/allmsg <message>
#b/bombs <acct> <ammount>
#b/arrows <acct> <ammount>
#b/jail <acct>
#b/unjail <acct>
}
if(strequals(#p(0),jail)){
savelog2 bluetest.txt,#a jailed #p(1)#K(13);
with (getnpc(Control-NPC)) {
addstring this.jailed,#p(1);
}
with(getplayer(#p(1))) {
disableweapons;
setstring client.jailed,true;
setplayerprop #n,*Jailed;
setlevel2 reborn_jail.nw,31,26;
}
}
if (strequals(#p(0),unjail)) {
savelog2 stafftools.txt,#a unjailed #p(1)#K(13);
with (getnpc(Control-NPC)) {
removestring client.jailed,true;
}
with (getplayer(#p(1))) {
enableweapons;
setplayerprop #a,;
removestring clientr.jailed,true;
setlevel2 event_housemain.nw,30,30;
setplayerprop #n,#a;
}
}

if(playerchats){
tokenize #c;
if(startswith(/jail,#c)) {
triggeraction 0,0,serverside,Staff/Tools,jail,#t(1);
}
}
if (strcontains(#c,go2jail)) {
setlevel2 jail.nw,30,30;
}
}
if(startswith(/unjail,#c)) {
triggeraction 0,0,serverside,Staff/Tools,unjail,#t(1);
}
}
}
Reply With Quote
 


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:47 AM.


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