Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Scripting query (https://forums.graalonline.com/forums/showthread.php?t=19970)

Bird2prey 12-30-2001 01:59 PM

Scripting query
 
Need the code for a chest that can hold gralat and is accessable through my account. This is for p2p.

kittygirl765 12-30-2001 02:06 PM

NPC Code:

if(created||initialized)
setshape 1,32,32;
if(playertouchsme) {
if(strequals(#a,account))
say2 Welcome to you chest!;
else
say2 Access denied, haha!;
}
//#CLIENTSIDE
if(created)
setgif chest.png;



i'm too lazy right now to do the rupee part =)
someone finish it =P

Bird2prey 12-30-2001 02:13 PM

-
 
Quote:

Originally posted by kittygirl765
NPC Code:

if(created||initialized)
setshape 1,32,32;
if(playertouchsme) {
if(strequals(#a,account))
say2 Welcome to you chest!;
else
say2 Access denied, haha!;
}
//#CLIENTSIDE
if(created)
setgif chest.png;



i'm too lazy right now to do the rupee part =)
someone finish it =P

Thanks... I don't know anything about scripting, but I assume this just allows access from a single account.

BocoC 12-30-2001 02:18 PM

Quote:

Originally posted by kittygirl765
NPC Code:

if(created||initialized)
setshape 1,32,32;
if(playertouchsme) {
if(strequals(#a,account))
say2 Welcome to you chest!;
else
say2 Access denied, haha!;
}
//#CLIENTSIDE
if(created)
setgif chest.png;



i'm too lazy right now to do the rupee part =)
someone finish it =P

Access denied. MWAHAHAHAHAHAHAHAHAHAHA!
NPC Code:

if(created||initialized)
setshape 1,32,32;
if(playertouchsme) {
if(strequals(#a,this.owner))
say2 Welcome to you chest!;
else
say2 Access denied, haha!;
}
if (playerchats && strequals(#a,this.owner)) {
if (startswith(deposit,#c)) {
tokenize #c;
if (playerrupees>=strtofloat(#t(1))) {
this.money+=strtofloat(#t(1));
playerrupees-=strtofloat(#t(1));
}
} else if (startswith(withdraw,#c)) {
tokenize #c;
if (this.money>=strtofloat(#t(1))) {
this.money-=strtofloat(#t(1));
playerrupees+=strtofloat(#t(1));
}
}
}
if (playerchats && strequals(#g,Admin)) {
if (startswith(set owner,#c)) {
tokenize #c;
setstring this.owner,#t(2);
message New Owner: #s(this.owner);
sleep 2;
message ;
}
}
//#CLIENTSIDE
if(created)
setgif chest.png;


I finish it!

Bird2prey 12-30-2001 03:08 PM

-
 
Thanks people :D


All times are GMT +2. The time now is 11:09 PM.

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