- Joined
- Apr 7, 2008
- Messages
- 570
- Reaction score
- 31
Hey, sometimes there's an event in your server like..
example: i got a first to 200 event
in my free market is an exp seller..
that's quite stupid..
SO.
i came up with a quick solution
if you make a npc put this at the start of it
you see the actived? that's what this is all about
now, ull start your script
a script ALWAYS have to start with this! this is the base
lets continue our script from beginning
ehr. that was it i guess?
thanks would be appreciated ^^
Summary:
example: i got a first to 200 event
in my free market is an exp seller..
that's quite stupid..
SO.
i came up with a quick solution
if you make a npc put this at the start of it
PHP:
var status = 0;
var on = 1;
var off = 0;
var activated = on;
you see the actived? that's what this is all about
now, ull start your script
PHP:
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
a script ALWAYS have to start with this! this is the base
lets continue our script from beginning
PHP:
var status = 0;
var on = 1;
var off = 0;
var activated = on;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (activated == on) {
YOUR SCRIPT HERE
script.. script..
more script!
end of script :P
} else {
cm.sendOk("I am not activated..");
cm.dispose();
}
}
}
ehr. that was it i guess?
thanks would be appreciated ^^
Summary:
PHP:
var on = 1;
var off = 0;
var activated = on;
if (activated == on) {
YOUR SCRIPT HERE
} else {
cm.sendOk("I am not activated..");
cm.dispose();
}
Last edited: