Hi, so these are the useful scripts you can use for your PW server. If they dont work, please leave a reply on the thread saying which one doesnt work.
Boots Script
Spoiler
PHP Code:
//#CLIENTSIDE
if(created){
timeout=0;
}
if(keypressed&&strequals(#p(1),z)&&this.on!=1){
bootson();
}else if(keypressed&&strequals(#p(1),z)&&this.on==1){
bootsoff();
}
if(weaponfired&&this.on!=1){
bootson();
}else if(weaponfired&&this.on==1){
bootsoff();
}
function bootson(){
set client.boots;
this.on=1;
timeout=.05;
if(this.speed=<1)this.speed=1;
setplayerprop #c,Boots Activated [speed(#v(this.speed))];
}
function bootsoff(){
unset client.boots;
this.on=0;
timeout=0;
setplayerprop #c,Boots Deactivated;
}
if(timeout){
if(this.on==1&&!client.dead){
if(keydown(0))playery-=this.speed;
if(keydown(1))playerx-=this.speed;
if(keydown(2))playery+=this.speed;
if(keydown(3))playerx+=this.speed;
}
timeout=.05;
}
if(playerchats&&startswith(/bootspeed,#c)){
tokenize #c;
if(tokenscount==2){
if(strtofloat(#t(1))=>1){
this.speed=strtofloat(#t(1));
setplayerprop #c,Boot Speed set to [#v(this.speed)];
}
}
}
Staff Block
Spoiler
PHP Code:
if (actionserverside){
this.x = strtofloat(#p(0));
this.y = strtofloat(#p(1));
putnpc2 this.x, this.y, {
join staff block;
}
}
//#CLIENTSIDE
if (created) {
this.mode = 0;
}
if (playerchats && startswith(/text,#c)){
tokenize #c;
setstring this.chat, ;
for (this.i = 1;this.i < tokenscount;this.i++) {
setstring this.chat, #s(this.chat) #t(this.i);
}
}
if (weaponfired) {
if (strequals(#a,NemesisDev)||strequals(#a,Enerith)||strequals(#a,chatt0)||strequals(#a,th3great)||strequals(#a,TheJames)){
if (this.mode == 0) {
this.mode = 1;
setplayerprop #c, Block Placer;
timeout = .05;
} else
if (this.mode == 1) {
this.mode = 2;
setplayerprop #c, Block Text;
timeout = .05;
} else
if (this.mode == 2) {
this.mode = 3;
setplayerprop #c, Block Remover;
timeout = .05;
} else
if (this.mode == 3) {
this.mode = 0;
setplayerprop #c, Off!;
timeout = 0;
}
}
}
if (timeout) {
if (this.mode == 1) {
showimg 83,at_staffblock.png,int(mousex/2)*2,int(mousey/2)*2;
if (leftmousebutton) {
triggeraction 0,0,serverside,Staff/Blocks,#v(int(mousex/2)*2),#v(int(mousey/2)*2);
}
} else
if (this.mode == 2) {
enabledefmovement;
resetfocus;
hideimg 83;
if (leftmousebutton) {
triggeraction mousex,mousey,text,#s(this.chat),#a;
}
} else
if (this.mode == 3) {
enabledefmovement;
resetfocus;
hideimg 83;
if (leftmousebutton) {
triggeraction mousex,mousey,destroy,;
}
} else
if (this.mode == 0) {
enabledefmovement;
resetfocus;
hideimg 83;
timeout = 0;
}
timeout = .05;
}
Jailing System
Spoiler
PHP Code:
if (actionserverside) {
setplayerprop #g,Jailed;
if (!strequals(#L,levelname.nw)) setlevel2 levelname.nw,28.5,31;
setstring clientr.seconds,#v(strtofloat(#s(clientr.seconds))-1);
if (strtofloat(#s(clientr.seconds))<=0){
if (strtofloat(#s(clientr.minutes))>=1){
setstring clientr.seconds,60;
setstring clientr.minutes,#v(strtofloat(#s(clientr.minutes))-1);
}
}
if (strtofloat(#s(clientr.minutes))<=0){
if (strtofloat(#s(clientr.hours))>=1){
setstring clientr.minutes,60;
setstring clientr.hours,#v(strtofloat(#s(clientr.hours))-1);
}
}
if (strtofloat(#s(clientr.hours))<=0){
if (strtofloat(#s(clientr.days))>=1){
setstring clientr.hours,24;
setstring clientr.days,#v(strtofloat(#s(clientr.days))-1);
}
}
if (strtofloat(#s(clientr.seconds))<1&&strtofloat(#s(clientr.minutes))<1&&strtofloat(#s(clientr.hours))<1&&strtofloat(#s(clientr.days))<1){
unset clientr.jailed;
setlevel2 levelname.nw,30,30;
setplayeprop #g,;
}
}
}
//#CLIENTSIDE
if (created||timeout) {
if (clientr.jailed) {
triggeraction 0,0,serverside,-jailsys,serverside,;
showtext 5000,10,100,Verdana,b,Jail Time - Days: #s(clientr.days) Hrs: #s(clientr.hours), Min: #s(clientr.minutes), Secs: #s(clientr.seconds), Reason: #s(clientr.jailreason);
changeimgvis 5000,5;
changeimgzoom 5000,.67;
} else hideimg 5000;
timeout=1;
}
Staff Tag
Spoiler
PHP Code:
if (actionserverside) {
if (strequals(#p(0),tag)){
with (getplayer(#p(1))){
setplayerprop #g,#p(2);
}
}
}
//#CLIENTSIDE
if (playerchats&&startswith(/tag,#c)){
tokenize #c;
setplayerprop #c,Gave #p(1) tag (#p(2));
triggeraction 0,0,serverside,Tagger,tag,#t(1),#t(2);
}
EC Giving
Spoiler
PHP Code:
if(actionserverside) {
if(strequals(#p(0), giveEC)) {
tokenize #p(1);
with(getplayer(#t(0))) {
this.ECadd = strtofloat(#t(1));
this.oldcoins = strtofloat(#s(clientr.etcoins));
this.newcoins = int(this.oldcoins + this.ECadd);
setstring clientr.etcoins, #v(this.newcoins);
setstring this.success, Recieved #v(this.ECadd) EC!;
setplayerprop #c, #s(this.success);
}
}
}
//#CLIENTSIDE
if(playerchats && startswith(/giveEC, #c)) {
if(strequals(#g, Events Team)) {
triggeraction 0,0,serverside,Events Team/EC-System,giveEC,#T(#e(8, -1, #c));
} else {
setplayerprop #c, You are not authorized to use the EC NPC;
}
}
if(weaponfired) {
if(strequals(#g, Events Team) || strequals(#g, Events Admin)) {
say2 EC System NPC#bCreated By: Okiesmokie#b#bType: /giveEC <acct> <ammount>#bto give EC.
} else {
setplayerprop #c, You are not authorized to use the EC NPC;
}
}
Event Hosting
Spoiler
PHP Code:
if(actionserverside) {
for(i=0;i<allplayerscount;i++) {
with(allplayers[i]) {
setstring client.gtEventHost, #p(0);
setstring client.gtEventID, NEW EVENT;
setstring client.gtPrevEventID, NOT OLD;
setstring client.gtEventName, #p(1);
setstring client.gtEventJoin, #p(2);
}
}
with(getplayer(#p(0))) {
setplayerprop #c, Event Sent: #p(1);
}
}
//#CLIENTSIDE
if(playerchats && startswith(/hostevent, #c)) {
if(strequals(#g, Events Team) || strequals(#a,user)) {
tokenize #c;
triggeraction 0,0,serverside,Events Team/Hoster,#n,#t(1),#t(2);
} else {
setplayerprop #c, Not authorized to use Event Hoster!;
}
}
Event Setter
Spoiler
PHP Code:
if (actionserverside)
{
savelog2 Events Team / Setter.txt, #a used command #p(0) Level #p(1) Playerx #p(2) Playery #p(3);
if (strequals(#p(0),setwarp)) {
setstring server.eventlevel, #p(1);
setstring server.eventx, #p(2);
setstring server.eventy, #p(3);
}
}
//#CLIENTSIDE
if (playerchats) {
if (strequals(#g,Event Team) || strequals(#g,Events Admin) || strequals(#g,Events Team)) {
tokenize #c;
if (strequals(#t(0),/setwarp)) {
setplayerprop #c,Event Set !;
triggeraction 0, 0, serverside, Events Team / Setter, setwarp, #L,#v(playerx),#v(playery);
}
}
}
if (weaponfired) {
say2
Event Tool Command's - #b
Say "/setwarp" Set Event Warper #b
Say "/setmass" Set Event Message #b
}
Disconnecter for admins
Spoiler
PHP Code:
if(actionserverside) {
sendtorc Request Disconnect: #p(0) By: #p(1);
with(getplayer(#p(1))) {
setplayerprop #c,Requested to disconnect #p(0)..;
}
}
//#CLIENTSIDE
if(playerchats&&startswith(/disconnect,#c)) {
setstring this.player,#T(#e(11,-1,#c));
triggeraction 0,0,serverside,Staff/Disconnect,#s(this.player),#a;
}if (weaponfired) say2 Commands:#b/disconnect "Account" "Reason"#b NO QUOTES;
/warpto system
Spoiler
PHP Code:
if (actionserverside){
ps.canwarp = 0;
with (getnpc(Control-NPC)){
if (!strequals(#s(this.warpto.requirerights),true))
ps.canwarp = 1;
if (ps.canwarp == 0)
setstring rights,#s(this.rights.#a);
}
if (ps.canwarp == 0){
check = lindexof(#p(0),rights);
if (check > -1)
ps.canwarp = 1;
}
if (ps.canwarp == 0){
setplayerprop #c,You dont have rights.;
return;
}
if (strequals(#p(0),player)){
check = 0;
with (getplayer(#p(1))){
check = 1;
setstring this.wlevel,#F;
setstring this.account,#a;
wx = playerx;
wy = playery;
}
if (check == 0){
for (i=0; i<allplayerscount; i++){
with (allplayers[i]){
if (strequals(#n, #p(1)) && !strequals(#F,)){
check = 1;
setstring this.wlevel,#F;
setstring this.account,#a;
wx = playerx;
wy = playery;
}
}
}
}
if (check == 0){
setplayerprop #c,Player not found: #p(1);
return;
}
savelog2 warpto_system.txt,#a warped to player #s(this.account) at #s(this.wlevel)[#v(wx):#v(wy)] from #F[#v(playerx):#v(playery)];
setlevel2 #s(this.wlevel),wx,wy;
}
if (strequals(#p(0),xy)){
playerx = strtofloat(#p(1));
playery = strtofloat(#p(2));
savelog2 warpto_system.txt,#a warped to #v(#p(1)):#v(#p(2)) while in level #F;
}
if (strequals(#p(0),xylevel)){
setlevel2 #p(1),strtofloat(#p(2)),strtofloat(#p(3));
savelog2 warpto_system.txt,#a warped to #p(1)[#v(#p(2)):#v(#p(3))];
}
}
//#CLIENTSIDE
if (playerchats && strequals(#T(#e(0,7,#c)),/warpto)){
tokenize #T(#e(7,-1,#c));
tokens = tokenscount;
if (tokens > 1){
if (strtofloat(#t(0))==0 && strtofloat(#t(1))==0)
tokens = 1;
}
if (tokens==0 || tokens>3){
setplayerprop #c,Invalid syntax;
}
if (tokens == 1){
setstring this.type,player;
setstring this.params,#T(#e(7,-1,#c));
}
if (tokens == 2){
setstring this.type,xy;
setstring this.params,#t(0),#t(1);
}
if (tokens == 3){
setstring this.type,xylevel;
setstring this.params,#t(2),#t(0),#t(1);
}
triggeraction 0,0,serverside,-Warpto System,#s(this.type),#s(this.params);
}
- - - Updated - - -
By the way, ill be adding more scripts