Moviana's Calculations

For in-game support requests, and bug reports.
Post Reply
Balkoth
Posts: 188
Joined: Mon Feb 23, 2015 1:55 pm

Moviana's Calculations

Post by Balkoth »

Are messed up for her potions. For example, I've specifically tested and seen her remove 3 Shadeleaf rather than 2 for a Mixture (and have screenshots to prove it).

I also started once with 20 Cherries and 4 Mixtures later I had 2 instead of 4 which is why I got suspicious in the first place.
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: Moviana's Calculations

Post by tarashon »

this is strange since she obviously calculates nothing but merely takes what she says she wants and the numbers in the scripts are fixed....

So perhaps some weird lag phenomena ?

/tara
Balkoth
Posts: 188
Joined: Mon Feb 23, 2015 1:55 pm

Re: Moviana's Calculations

Post by Balkoth »

I doubt it's lag and rather an error in the scripts. Able to post them for the mixture and elixirs?
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: Moviana's Calculations

Post by tarashon »

lemme try to find them yes....

/tara
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: Moviana's Calculations

Post by tarashon »

mixture...

take_shadefern2

void main()

{
object oPC = GetPCSpeaker();
int antal = 2;
string tag = "food_highfern";

object oItem = GetFirstItemInInventory( oPC );
int count = 0;
int stackSize;
int i;

while(GetIsObjectValid(oItem) && count < antal)
{
// Check tag
if (GetTag(oItem) == tag)
{
stackSize = GetItemStackSize(oItem);
if(stackSize == 1)
{
DestroyObject(oItem);
}
else
{
for(i=0; i<stackSize; i++)
{
SetItemStackSize(oItem,GetItemStackSize(oItem)-1);
count+=1;
if(count == antal)
{
return;
}
}
// Take care of last one.
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}
return;
}

take_cherry4

void main()

{
object oPC = GetPCSpeaker();
int antal = 4;
string tag = "food_cherie";

object oItem = GetFirstItemInInventory( oPC );
int count = 0;
int stackSize;
int i;

while(GetIsObjectValid(oItem) && count < antal)
{
// Check tag
if (GetTag(oItem) == tag)
{
stackSize = GetItemStackSize(oItem);
if(stackSize == 1)
{
DestroyObject(oItem);
}
else
{
for(i=0; i<stackSize; i++)
{
SetItemStackSize(oItem,GetItemStackSize(oItem)-1);
count+=1;
if(count == antal)
{
return;
}
}
// Take care of last one.
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}
return;
}

and elixir....

take_shadefern3


void main()

{
object oPC = GetPCSpeaker();
int antal = 3;
string tag = "food_highfern";

object oItem = GetFirstItemInInventory( oPC );
int count = 0;
int stackSize;
int i;

while(GetIsObjectValid(oItem) && count < antal)
{
// Check tag
if (GetTag(oItem) == tag)
{
stackSize = GetItemStackSize(oItem);
if(stackSize == 1)
{
DestroyObject(oItem);
}
else
{
for(i=0; i<stackSize; i++)
{
SetItemStackSize(oItem,GetItemStackSize(oItem)-1);
count+=1;
if(count == antal)
{
return;
}
}
// Take care of last one.
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}
return;
}

take_cherry6

void main()

{
object oPC = GetPCSpeaker();
int antal = 6;
string tag = "food_cherie";

object oItem = GetFirstItemInInventory( oPC );
int count = 0;
int stackSize;
int i;

while(GetIsObjectValid(oItem) && count < antal)
{
// Check tag
if (GetTag(oItem) == tag)
{
stackSize = GetItemStackSize(oItem);
if(stackSize == 1)
{
DestroyObject(oItem);
}
else
{
for(i=0; i<stackSize; i++)
{
SetItemStackSize(oItem,GetItemStackSize(oItem)-1);
count+=1;
if(count == antal)
{
return;
}
}
// Take care of last one.
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}
return;
}

and then she takes an ibisflower but...

Thats it...

/tara
Balkoth
Posts: 188
Joined: Mon Feb 23, 2015 1:55 pm

Re: Moviana's Calculations

Post by Balkoth »

Okay, yeah, just looking over the Shadefern 2 shows at least two major bugs:

1, when you check if the stack size is 1, you don't increment counter. This means if I have 16 individual Shadeferns it'll destroy all of them and give no credit.

2, the for loop is wrong. For example, imagine I have 2 Shadeferns in a stack. First time through the loop it sets the stack size to 1 and the counter to 1. Second time through the loop it sets the stack size to 1 again (because a stack of 1 minus 1 is still 1) and ups the counter to 2 -- thus it returns thinking it took 2 while only taking 1.
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: Moviana's Calculations

Post by tarashon »

Sorry Balkoth but all I hear is blabla yabbidi something scriptlike haha.

I'm sure Seeker will have an idea what you are talking about :)

/tara
Somnium
Site Admin
Posts: 173
Joined: Sat Jan 10, 2015 5:34 pm

Re: Moviana's Calculations

Post by Somnium »

Ah, I did not realize that Moviana is still using one of the old semi-autogenerated/hand-edited item-scripts, instead of the quest-script system.

The above scripts should be deleted, and the quest system should be used instead (it has an option for unlimited exchanges) :)
Somnium (a.k.a. Seeker)
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: Moviana's Calculations

Post by tarashon »

Hmm perhaps you would fancy redoing her and sending me the new version Seeker ? :)

*smiles brighty and extremely charming - kinda like a puppy on steroids or whatever might work really*

/tara
Post Reply