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.
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);
}
//#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;
}
}
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
08-07-2017, 07:46 PM
StefanE
Lol no need of a disconnecting script when you can do it by opening playerlist right click on the player and disconnect him ez you can even type a reason
08-08-2017, 06:29 AM
TheLolman19281
Quote:
Originally Posted by StefanEmerson
Lol no need of a disconnecting script when you can do it by opening playerlist right click on the player and disconnect him ez you can even type a reason
I think itll be a trouble for people who has a big server, lets say, you wanna find Player1 but you cant because its too hard since there are 500 players online.
08-08-2017, 06:39 AM
Kendrick
"By the way, ill be adding more scripts"
=[
Thanks though!
08-08-2017, 06:48 AM
TheLolman19281
Quote:
Originally Posted by Kendrick
"By the way, ill be adding more scripts"
=[
Thanks though!
Dont worry i will add more i have around 100 scripts, useful scripts.
Ill post a script showing how u can script a gun
08-14-2017, 02:26 PM
z7654321
Wow this is very useful, thanks!
08-14-2017, 07:06 PM
JungleJimmy
I passed out when I clicked the first spoiler.
08-14-2017, 08:36 PM
AbcGraal
How do you change the tileset of a server
Sent from my iPhone using Tapatalk
03-21-2018, 03:46 PM
Evination
If you google it that would have done the trick too.
Quote:
Originally Posted by AbcGraal
How do you change the tileset of a server
Sent from my iPhone using Tapatalk
Its easiest by creating an npc and writing this code:
Using GS2 for online-servers:
Code:
//#CLIENTSIDE
function onCreated(){
addtiledef("tileset.png",null,0);
}
Using GS1 for offline-editor:
Code:
//#CLIENTSIDE
function onCreated(){
removetiledefs;
addtiledef tileset.png,,0;
}
The first parameter is of course the name of the tileset(filename.filetype),
you only need the second parameter if you want your tileset to be applied in specific levels, like "gmap_level*.nw".
The last parameter is the tileset type, if you use an era-type tileset its type 1, classic tileset is type 0 (you can look it up here)
For your tileset to work it has to be a 8-bit image I guess.