Reader Script Error

Topics regarding Scripting with Reality Factory
Post Reply
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Reader Script Error

Post by Jay »

i got a reader script error and really don't know what's wrong....
RealityFactory.log wrote: Reader Script Error for GameSystem
scripts\gs.s:
That's all i get.

Here is the script:
gs.s wrote: {
CONSOLE [true]
SELECT [null]
LASTHEALTH [0]
RESTOREHEALTH [0]
CHAR_SELECT [0]
GETINTIME [0]
LASTCASTTIME_DIO [0]
NEXTCASTTIME_DIO [0]
CASTTIME [1.0]
TORCHON [false]
LASTTTIME [0]
MOUSEX [0]
MOUSEY [0]
TORCHTIME [60]
SELECT1 [null]
USETIME [1.0]
LASTUSETIME [0]
LASTTICK [0]
LIGHTV [0]
DT [0]
DAM_TAKEN [0]
HPOTION1 [50]
HPOTION2 [500]
HPOTION3 [5000]
HPOTION4 [50000]
HPOTION5 [500000]
HPOTION6 [5000000]
HPOTION7 [9000000]
MPOTION1 [30]
MPOTION2 [300]
MPOTION3 [3000]
MPOTION4 [30000]
MPOTION5 [300000]
MPOTION6 [3000000]
MPOTION7 [5000000]

REGENERATIONTIME [2.5]
LASTREGTIME [0]
REGHELP [0]

CURRENTITEMTODRAW [0]
NCURRENTITEMTODRAW [0]
ITEMNUMBER [0]

INTERACTION_A [0] //1=In Equipment 2=Conversation 3=Merchant
MERCHANT_DATA [0]

X[0]
Y[0]

Setup[ ()
{
Console(CONSOLE);
SetEventState("Always",true);
SetGroup("STATIC");
//->LowLevel
LowLevel("Init");
}
Init[ ()
{
SetNoCollision();
MouseControlledPlayer(false);
ShowMouse(true);
LASTHEALTH = GetAttribute("health","Player");
RESTOREHEALTH = 0;
ActivateHudElement("p0",true);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
LASTTICK=self.time;
DT=GetAttribute("Daytime","Player");
if(DT>17 or DT<8)
{
SetEventState("Night",true);
}
else
{
SetEventState("Night",true);
}
CHAR_SELECT=GetAttribute("Selected","Player");
self.think = "LoopLowLevel";
} ]
LoopLowLevel[ ()
{
debug(self.key_pressed);
self.ThinkTime=0;
MouseControlledPlayer(false);
ShowMouse(true);

//SetTime
if(self.time>LASTTICK+60)
{
if(GetAttribute("Daytime","Player")=24)
{
SetAttribute("Daytime",1,"Player");
}
else
{
ModifyAttribute("Daytime",1,"Player");
}
DT=GetAttribute("Daytime","Player");
if(DT<13)
{
LIGHTV=DT;
}
else
{
LIGHTV=24-DT;
}
//Takes too much time.
//SetGamma(1+(LIGHTV/8));
if(DT>17 or DT<8)
{
SetEventState("Night",true);
}
else
{
//Night because of bad looking torches on day
SetEventState("Night",true);
}
LASTTICK=self.time;
}

//Show what is selected with the mouse
SELECT = MouseSelect(true);
SELECT1 = StringCopy(SELECT);
if(LeftCopy(SELECT,5)="CHEST")
{
SELECT = "Chest";
}
if(LeftCopy(SELECT,10)="Cavespider")
{
SELECT = "Cavespider";
}
if(LeftCopy(SELECT,7)="Caverat")
{
SELECT = "Caverat";
}
if(LeftCopy(SELECT,8)="Skeleton")
{
SELECT = "Skeleton";
}
if(LeftCopy(SELECT,5)="Woman")
{
SELECT = "Woman";
}
if(LeftCopy(SELECT,6)="Zombie")
{
SELECT = "Zombie";
}
if(SELECT="Player")
{
SELECT = "Dioran";
}

ShowText(0,SELECT1,"",SELECT,0,"",0,-50,"center",255);

//draw the 'Spellbox'
switch(CHAR_SELECT)
{
case 0
{
DrawFlipBookImage("Inventory",4,500,0,255,255,255,255,1);
}
}

//Get player's input
switch(self.key_pressed)
{
case 1 //Cast Spell Nr 1
{
switch(CHAR_SELECT)
{
case 0 //Dioran casts Moonbeam
{
if(self.time>LASTCASTTIME_DIO+CASTTIME)
{
if(GetAttribute("mana","Player")>7)
{
UpdateTarget();
UpdateEnemyVis();
FireProjectile("Moonbeam", "joint1", 0, 10, 0, "health");
ModifyAttribute("mana",-8,"Player");
LASTCASTTIME_DIO=self.time;
}
}
}
}
}
case 2 //Cast Spell Nr 2
{
switch(CHAR_SELECT)
{
case 0 //Dioran casts Silveredge
{
if(self.time>LASTCASTTIME_DIO+CASTTIME)
{
if(GetAttribute("mana","Player")>12)
{
UpdateTarget();
UpdateEnemyVis();
FireProjectile("Silveredge", "joint1", 0, 0, 0, "health");
ModifyAttribute("mana",-13,"Player");
LASTCASTTIME_DIO=self.time;
}
}
}
}
}
case 21 //Inventory
{
if(self.time>(GETINTIME+0.5))
{
GETINTIME=self.time;
self.think="Equipment";
return;
}
}
case 25 //Lookmode
{
MouseControlledPlayer(true);
ShowMouse(false);
}
case 47 //also Lookmode
{
MouseControlledPlayer(true);
ShowMouse(false);
}
case 59 //Select Dioran
{
CHAR_SELECT=0;
ActivateHudElement("p0",true);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 60 //Select Kriston
{
debug("bla");
CHAR_SELECT=1;
ActivateHudElement("p0",false);
ActivateHudElement("p1",true);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 61 //Select Tim
{
CHAR_SELECT=2;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",true);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 62 //Select Fia
{
CHAR_SELECT=3;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",true);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 63 //Select Sarah
{
CHAR_SELECT=4;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",true);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 64 //Select Kia
{
CHAR_SELECT=5;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",true);
ActivateHudElement("p6",false);
}
case 65 //Select Ksave
{
CHAR_SELECT=6;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",true);
}
case 72
{
if(CHAR_SELECT=0)
{
SetTarget(SELECT1);
UpdateTarget();
UpdateEnemyVis();
}
if(CHAR_SELECT=1)
{
Kriston.TARGETER=StringCopy(SELECT1);
}
}
case 73
{
if(CHAR_SELECT=1) //Kriston was activated
{
Kriston.STRATEGY=1;
Kriston.TARGETER=StringCopy(SELECT1);
}
}
}
if(CHAR_SELECT>=GetAttribute("partysize","Player"))
{
CHAR_SELECT=0;
ActivateHudElement("p0",true);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}

//Copy Selected to PlayerAttributes
SetAttribute("Selected",CHAR_SELECT,"Player");

//Keep track of players position
PositionToPlayer(0, 2, 0, true,true);

//If Torches are on
if(TORCHON=true)
{
if(self.time>(LASTTTIME+1))
{
LASTTTIME=self.time;
TORCHTIME=TORCHTIME-1;
if(TORCHTIME=0)
{
SetEventState("torchon",false);
TORCHON=false;
}
}
}

//Armor system
if(LASTHEALTH>GetAttribute("health","Player"))
{
DAM_TAKEN=LASTHEALTH-GetAttribute("health","Player");
if(DAM_TAKEN>0)
{
//Reduce by armor class (percent)
RESTOREHEALTH=DAM_TAKEN*GetAttribute("armorclass","Player")/100;
//Minimum damage is 1
if(RESTOREHEALTH>=DAM_TAKEN)
{
RESTOREHEALTH=DAM_TAKEN-1;
}
SetAttribute("hitby",15,"Player"); //Reset type player was hit by
SetAttribute("health",GetAttribute("health","Player")+RESTOREHEALTH,"Player"); //Restore HP
}
}
//Mana Regeneration: every 2,5secs
if(self.time>REGENERATIONTIME+LASTREGTIME)
{
REGHELP=GetAttribute("d_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("mana",REGHELP,"Player");
REGHELP=GetAttribute("k_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("k_mana",REGHELP,"Player");
REGHELP=GetAttribute("t_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("t_mana",REGHELP,"Player");
REGHELP=GetAttribute("f_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("f_mana",REGHELP,"Player");
REGHELP=GetAttribute("s_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("s_mana",REGHELP,"Player");
REGHELP=GetAttribute("ke_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("ke_mana",REGHELP,"Player");
REGHELP=GetAttribute("ks_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("ks_mana",REGHELP,"Player");
LASTREGTIME=self.time;
}
//Level-Up
if(GetAttribute("exp","Player")=GetAttribute("level","Player")*1000)
{
SetAttribute("exp",0,"Player");
SetAttribute("level",GetAttribute("level","Player")+1,"Player");
PowerUp("exp",1000,false,"Player");
//Increase stats by 10% per level
ModifyAttribute("d_strenght", GetAttribute("d_strenght","Player")/10,"Player");
ModifyAttribute("d_stamina", GetAttribute("d_stamina","Player")/10,"Player");
ModifyAttribute("d_dexterity",GetAttribute("d_dexterity","Player")/10,"Player");
ModifyAttribute("d_intelligence",GetAttribute("d_intelligence","Player")/10,"Player");
ModifyAttribute("d_knowledge",GetAttribute("d_knowledge","Player")/10,"Player");
ModifyAttribute("d_will",GetAttribute("d_will","Player")/10,"Player");
SetAttributeValueLimits("health",0,GetAttribute("d_stamina","Player")*3,"Player");
SetAttributeValueLimits("mana",0,GetAttribute("d_knowledge","Player"),"Player");
ModifyAttribute("k_strenght",GetAttribute("k_strength","Player")/10,"Player");
ModifyAttribute("k_stamina",GetAttribute("k_stamina","Player")/10,"Player");
ModifyAttribute("k_dexterity",GetAttribute("k_dexterity","Player")/10,"Player");
ModifyAttribute("k_intelligence",GetAttribute("k_intelligence","Player")/10,"Player");
ModifyAttribute("k_knowledge",GetAttribute("k_knowledge","Player")/10,"Player");
ModifyAttribute("k_will",GetAttribute("k_will","Player")/10,"Player");
SetAttributeValueLimits("k_health",0,GetAttribute("k_stamina","Player")*3,"Player");
SetAttributeValueLimits("k_mana",0,GetAttribute("k_knowledge","Player"),"Player");
ModifyAttribute("t_strenght",GetAttribute("t_strength","Player")/10,"Player");
ModifyAttribute("t_stamina",GetAttribute("t_stamina","Player")/10,"Player");
ModifyAttribute("t_dexterity",GetAttribute("t_dexterity","Player")/10,"Player");
ModifyAttribute("t_intelligence",GetAttribute("t_intelligence","Player")/10,"Player");
ModifyAttribute("t_knowledge",GetAttribute("t_knowledge","Player")/10,"Player");
ModifyAttribute("t_will",GetAttribute("t_will","Player")/10,"Player");
SetAttributeValueLimits("t_health",0,GetAttribute("t_stamina","Player")*3,"Player");
SetAttributeValueLimits("t_mana",0,GetAttribute("t_knowledge","Player"),"Player");
ModifyAttribute("f_strenght",GetAttribute("f_strength","Player")/10,"Player");
ModifyAttribute("f_stamina",GetAttribute("f_stamina","Player")/10,"Player");
ModifyAttribute("f_dexterity",GetAttribute("f_dexterity","Player")/10,"Player");
ModifyAttribute("f_intelligence",GetAttribute("f_intelligence","Player")/10,"Player");
ModifyAttribute("f_knowledge",GetAttribute("f_knowledge","Player")/10,"Player");
ModifyAttribute("f_will",GetAttribute("f_will","Player")/10,"Player");
SetAttributeValueLimits("f_health",0,GetAttribute("f_stamina","Player")*3,"Player");
SetAttributeValueLimits("f_mana",0,GetAttribute("f_knowledge","Player"),"Player");
ModifyAttribute("s_strenght",GetAttribute("s_strength","Player")/10,"Player");
ModifyAttribute("s_stamina",GetAttribute("s_stamina","Player")/10,"Player");
ModifyAttribute("s_dexterity",GetAttribute("s_dexterity","Player")/10,"Player");
ModifyAttribute("s_intelligence",GetAttribute("s_intelligence","Player")/10,"Player");
ModifyAttribute("s_knowledge",GetAttribute("s_knowledge","Player")/10,"Player");
ModifyAttribute("s_will",GetAttribute("s_will","Player")/10,"Player");
SetAttributeValueLimits("s_health",0,GetAttribute("s_stamina","Player")*3,"Player");
SetAttributeValueLimits("s_mana",0,GetAttribute("s_knowledge","Player"),"Player");
ModifyAttribute("ke_strenght",GetAttribute("ke_strength","Player")/10,"Player");
ModifyAttribute("ke_stamina",GetAttribute("ke_stamina","Player")/10,"Player");
ModifyAttribute("ke_dexterity",GetAttribute("ke_dexterity","Player")/10,"Player");
ModifyAttribute("ke_intelligence",GetAttribute("ke_intelligence","Player")/10,"Player");
ModifyAttribute("ke_knowledge",GetAttribute("ke_knowledge","Player")/10,"Player");
ModifyAttribute("ke_will",GetAttribute("ke_will","Player")/10,"Player");
SetAttributeValueLimits("ke_health",0,GetAttribute("ke_stamina","Player")*3,"Player");
SetAttributeValueLimits("ke_mana",0,GetAttribute("ke_knowledge","Player"),"Player");
ModifyAttribute("ks_strenght",GetAttribute("ks_strength","Player")/10,"Player");
ModifyAttribute("ks_stamina",GetAttribute("ks_stamina","Player")/10,"Player");
ModifyAttribute("ks_dexterity",GetAttribute("ks_dexterity","Player")/10,"Player");
ModifyAttribute("ks_intelligence",GetAttribute("ks_intelligence","Player")/10,"Player");
ModifyAttribute("ks_knowledge",GetAttribute("ks_knowledge","Player")/10,"Player");
ModifyAttribute("ks_will",GetAttribute("ks_will","Player")/10,"Player");
SetAttributeValueLimits("ks_health",0,GetAttribute("ks_stamina","Player")*3,"Player");
SetAttributeValueLimits("ks_mana",0,GetAttribute("ks_knowledge","Player"),"Player");
//Maximize Attributes
ModifyAttribute("health",10000000,"Player");
ModifyAttribute("k_health",10000000,"Player");
ModifyAttribute("t_health",10000000,"Player");
ModifyAttribute("f_health",10000000,"Player");
ModifyAttribute("s_health",10000000,"Player");
ModifyAttribute("ke_health",10000000,"Player");
ModifyAttribute("ks_health",10000000,"Player");
ModifyAttribute("mana",10000000,"Player");
ModifyAttribute("k_mana",10000000,"Player");
ModifyAttribute("t_mana",10000000,"Player");
ModifyAttribute("f_mana",10000000,"Player");
ModifyAttribute("s_mana",10000000,"Player");
ModifyAttribute("ke_mana",10000000,"Player");
ModifyAttribute("ks_mana",10000000,"Player");
//Set the attributes...
if(GetAttribute("partysize")>1)
{
SetAttribute("health",GetAttribute("k_health","Player"),"Kriston");
SetAttribute("mana",GetAttribute("k_mana","Player"),"Kriston");
}
if(GetAttribute("partysize")>2)
{
SetAttribute("health",GetAttribute("t_health","Player"),"Tim");
SetAttribute("mana",GetAttribute("t_mana","Player"),"Tim");
}
if(GetAttribute("partysize")>3)
{
SetAttribute("health",GetAttribute("f_health","Player"),"Fia");
SetAttribute("mana",GetAttribute("f_mana","Player"),"Fia");
}
if(GetAttribute("partysize")>4)
{
SetAttribute("health",GetAttribute("s_health","Player"),"Sarah");
SetAttribute("mana",GetAttribute("s_mana","Player"),"Sarah");
}
if(GetAttribute("partysize")>5)
{
SetAttribute("health",GetAttribute("ke_health","Player"),"Kia");
SetAttribute("mana",GetAttribute("ke_mana","Player"),"Kia");
}
if(GetAttribute("partysize")>6)
{
SetAttribute("health",GetAttribute("ks_health","Player"),"Ksave");
SetAttribute("mana",GetAttribute("ks_mana","Player"),"Ksave");
}
}
LASTHEALTH=GetAttribute("health","Player");
} ]
Equipment[ ()
{
FillScreenArea(0,false,255);
DrawFlipBookImage("Inventory",0,0,24,255,255,255,255,2);
switch(CHAR_SELECT)
{
case 0 //Dioran
{
for y = 0 to 5 + 1
{
for x = 0 to 4 + 1
{
CURRENTITEMTODRAW="d_eq" # x # "x" # y;
debug(CURRENTITEMTODRAW);
ITEMNUMBER=GetAttribute(CURRENTITEMTODRAW,"Player");
if(ITEMNUMBER>0)
{
DrawFlipBookImage("Inventory",ITEMNUMBER,1+x*66,79+y*66,255,255,255,255,1);
if(y<4)
{
DrawText(GetAttribute(NCURRENTITEMTODRAW,"Player"),1+x*66,79+y*66,255,0,255,255,255);
}
}
}
}
DrawText("Name: Dioran", 500, 100, 255, 0, 255, 255, 255);
DrawText("Element: Moon", 500, 120, 255, 0, 255, 255, 255);
DrawText("Strenght: " # GetAttribute("d_strenght","Player"), 500, 180, 255, 0, 255, 255, 255);
DrawText("Stamina: " # GetAttribute("d_stamina","Player"), 500, 200, 255, 0, 255, 255, 255);
DrawText("Dexterity: " # GetAttribute("d_dexterity","Player"), 500, 220, 255, 0, 255, 255, 255);
DrawText("Intelligence: " # GetAttribute("d_intelligence","Player"), 500, 240, 255, 0, 255, 255, 255);
DrawText("Knowledge: " # GetAttribute("d_knowledge","Player"), 500, 260, 255, 0, 255, 255, 255);
DrawText("Will: " # GetAttribute("d_will","Player"), 500, 280, 255, 0, 255, 255, 255);
DrawText("HP: " # GetAttribute("health","Player"), 500, 300, 255, 0, 255, 255, 255);
DrawText("MP: " # GetAttribute("mana","Player"), 500, 320, 255, 0, 255, 255, 255);
}
case 1 //Kriston
{
if(GetAttribute("HealthPotion","Player")>0)
{
DrawFlipBookImage("Inventory",3,1,177,255,255,255,255,1);
DrawText(GetAttribute("HealthPotion","Player"), 1, 177, 255, 0, 255, 255, 255);
}
DrawText("Name: Kriston", 500, 100, 255, 0, 255, 255, 255);
DrawText("Element: Earth", 500, 120, 255, 0, 255, 255, 255);
DrawText("Strenght: " # GetAttribute("k_strenght","Player"), 500, 180, 255, 0, 255, 255, 255);
DrawText("Stamina: " # GetAttribute("k_stamina","Player"), 500, 200, 255, 0, 255, 255, 255);
DrawText("Dexterity: " # GetAttribute("k_dexterity","Player"), 500, 220, 255, 0, 255, 255, 255);
DrawText("Intelligence: " # GetAttribute("k_intelligence","Player"), 500, 240, 255, 0, 255, 255, 255);
DrawText("Knowledge: " # GetAttribute("k_knowledge","Player"), 500, 260, 255, 0, 255, 255, 255);
DrawText("Will: " # GetAttribute("k_will","Player"), 500, 280, 255, 0, 255, 255, 255);
DrawText("HP: " # GetAttribute("k_health","Player"), 500, 300, 255, 0, 255, 255, 255);
DrawText("MP: " # GetAttribute("k_mana","Player"), 500, 320, 255, 0, 255, 255, 255);
}
//Tim
//Fia
//Sarah
//Kia
//Ksave
//???
}

//Mana Regeneration
if(self.time>REGENERATIONTIME+LASTREGTIME)
{
REGHELP=GetAttribute("d_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("mana",REGHELP,"Player");
REGHELP=GetAttribute("k_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("k_mana",REGHELP,"Player");
REGHELP=GetAttribute("t_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("t_mana",REGHELP,"Player");
REGHELP=GetAttribute("f_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("f_mana",REGHELP,"Player");
REGHELP=GetAttribute("s_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("s_mana",REGHELP,"Player");
REGHELP=GetAttribute("ke_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("ke_mana",REGHELP,"Player");
REGHELP=GetAttribute("ks_will","Player")/40;
if(REGHELP=0)
{
REGHELP=1;
}
ModifyAttribute("ks_mana",REGHELP,"Player");
LASTREGTIME=self.time;
}

switch(self.key_pressed)
{
case 21 //get out if at least a half second in inventory
{
if(self.time>(GETINTIME+0.5))
{
GETINTIME=self.time;
self.think="LoopLowLevel";
return;
}
}
case 59 //Select Dioran
{
CHAR_SELECT=0;
ActivateHudElement("p0",true);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 60 //Select Kriston
{
CHAR_SELECT=1;
ActivateHudElement("p0",false);
ActivateHudElement("p1",true);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 61 //Select Tim
{
CHAR_SELECT=2;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",true);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 62 //Select Fia
{
CHAR_SELECT=3;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",true);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 63 //Select Sarah
{
CHAR_SELECT=4;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",true);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
case 64 //Select Kia
{
CHAR_SELECT=5;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",true);
ActivateHudElement("p6",false);
}
case 65 //Select Ksave
{
CHAR_SELECT=6;
ActivateHudElement("p0",false);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",true);
}
case 73
{
MOUSEX=GetMousePosX();
MOUSEY=GetMousePosY();

switch(CHAR_SELECT)
{
case 0
{
if(MOUSEX>1)
{
if(MOUSEY>79)
{
if(MOUSEY<175) //1,2,3,4
{
if(MOUSEX<97) //1(torch)
{
if(GetAttribute("torches","Player"))
{
if(TORCHON=false)
{
TORCHTIME=60;
TORCHON=true;
SetEventState("torchon",true);
ModifyAttribute("torches",-1,"Player");
LASTUSETIME=self.time;
debug("Torch=ON");
}
}
}
if(MOUSEX>99 and MOUSEX<197) //2
{
;
}
}
if(MOUSEY>177 and MOUSEY<273) //5,6,7,8
{
if(MOUSEX<97) //5 (HealthPotion)
{
if(GetAttribute("HealthPotion","Player")>0)
{
if(self.time>LASTUSETIME+USETIME)
{
ModifyAttribute("health", HPOTION1,"Player");
ModifyAttribute("HealthPotion",-1,"Player");
LASTUSETIME=self.time;
}
}
}
}
}
}
}
case 1
{
if(MOUSEX>1)
{
if(MOUSEY>79)
{
if(MOUSEY<175) //1,2,3,4
{
if(MOUSEX<97) //1
{
;
}
if(MOUSEX>99 and MOUSEX<197) //2
{
;
}
}
if(MOUSEY>177 and MOUSEY<273) //5,6,7,8
{
if(MOUSEX<97) //5 (HealthPotion)
{
if(GetAttribute("HealthPotion","Player")>0)
{
if(self.time>LASTUSETIME+USETIME)
{
DamageEntity(HPOTION1*(-1),"health","Kriston");
ModifyAttribute("HealthPotion",-1,"Player");
LASTUSETIME=self.time;
}
}
}
}
}
}
}
}
}
}
if(CHAR_SELECT>=GetAttribute("partysize","Player"))
{
CHAR_SELECT=0;
ActivateHudElement("p0",true);
ActivateHudElement("p1",false);
ActivateHudElement("p2",false);
ActivateHudElement("p3",false);
ActivateHudElement("p4",false);
ActivateHudElement("p5",false);
ActivateHudElement("p6",false);
}
SetAttribute("selected",CHAR_SELECT,"Player");
} ]
}
Any suggestions?
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

No closing bracket in setup:

Setup[ ()
{
Console(CONSOLE);
SetEventState("Always",true);
SetGroup("STATIC");
//->LowLevel
LowLevel("Init");
}

Should be:

Setup[ ()
{
Console(CONSOLE);
SetEventState("Always",true);
SetGroup("STATIC");
//->LowLevel
LowLevel("Init");
} ]

(Unless I've totally fallen off my simkin rocker after a few years of not using it much)
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

Yes thanks, you're right, i really forgot the bracket :)

Problem is there seem to be more than only that one mistake because i still get that same reader script error..
Everyone can see the difficult, but only the wise can see the simple.
-----
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

Ok i now know where the problem lies and now i have solved it.

Seems the reader had problems with this line:
gs.s wrote: INTERACTION [0] //1=In Equipment 2=Conversation 3=Merchant
Don't know why though. :lol:
Everyone can see the difficult, but only the wise can see the simple.
-----
Post Reply