Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-09-2009, 10:03 AM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Might want to use save strings for the accounts, here's how

HTML Code:
function onCreated() {
  save[0] = "Sum41Freeeeek,The411";
}

function onActionGrab() {
  if (!(player.account in save[0].tokenize(","))) return;
  if (player.chat != "open") return;
  this.dontblock();
  setTimer(2);
}
function onTimeout() {
  this.blockagain();
}
//#CLIENTSIDE
function onCreated() {
  this.setshape(1, 2*16, 6*16); 
}
function onActionGrab() {
  if (!(player.account in save[0].tokenize(","))) {
    temp.timer = 0;
  } else {
    this.dontblock();
    temp.timer = 2;
  }
  setTimer(temp.timer);
}
function onTimeout() {
  this.blockagain();
}
Reply With Quote
  #2  
Old 05-09-2009, 01:36 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by [email protected] View Post
Might want to use save strings for the accounts, here's how
What does that do, aside from creating an unnecessary global variable and extra checks? I've never seen nor heard of a predefined save array.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #3  
Old 05-09-2009, 04:15 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by LoneAngelIbesu View Post
I've never seen nor heard of a predefined save array.
It's about time then.

Edit: Extract from commands.rtf:
HTML Code:
save[0],..,save[9]	      built-in variables that work in online mode (integer values >=0, <=220)
Reply With Quote
Reply


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 01:22 PM.


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