Particle's Custom RPG

Assistance => Assistance & Feedback => Topic started by: FrieD on July 6, 2003 08:21 pm CDT

Title: beer
Post by: FrieD on July 6, 2003 08:21 pm CDT
I was wondering what i am doing wrong here. I am wanting to make beer for a server and it wont work can u help me

};

$HardcodedItemCost[Beer] = 5;
$HardcodedItemCost[GodlyBeer] = 10;
$HardcodedItemCost[Shot] = 5;
$HardcodedItemCost[Magirita] = 10;
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//   Beer
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$AccessoryVar[Beer, $Weight] = 0;
$AccessoryVar[Beer, $MiscInfo] = "Beer";
ItemData Beer
{
   description = "Beer";
   shapeFile = "armorKit";
   heading = "eMiscellany";
   className = "Accessory";
   shadowDetailMask = 4;
   price = 0;
};
function Beer::onUse(%player,%item)
{
   %clientId = Player::getClient(%player);

   Player::decItemCount(%player,%item);
   %hp = fetchData(%clientId, "HP");
   refreshHP(%clientId, -0.15);
   refreshAll(%clientId);

   if(fetchData(%clientId, "HP") != %hp)
      UseSkill(%clientId, $SkillHealing, True, True);
}

$AccessoryVar[GodlyBeer, $Weight] = 0;
$AccessoryVar[GodlyBeer, $MiscInfo] = "Beer For the Gods";
ItemData GodlyBeer
{
   description = "GodlyBeer";
   shapeFile = "armorKit";
   heading = "eMiscellany";
   className = "Accessory";
   shadowDetailMask = 4;
   price = 0;
};
function GodlyBeer::onUse(%player,%item)
{
   %clientId = Player::getClient(%player);

   Player::decItemCount(%player,%item);
   %hp = fetchData(%clientId, "HP");
   refreshHP(%clientId, -0.6);
   refreshAll(%clientId);

   if(fetchData(%clientId, "HP") != %hp)
      UseSkill(%clientId, $SkillHealing, True, True);
}

$AccessoryVar[Shot, $Weight] = 0;
$AccessoryVar[Shot, $MiscInfo] = "A shot of the finest rum";
ItemData Shot
{
   description = "Shot";
   shapeFile = "armorKit";
   heading = "eMiscellany";
   className = "Accessory";
   shadowDetailMask = 4;
   price = 0;
};
function Shot::onUse(%player,%item)
{
   %clientId = Player::getClient(%player);

   Player::decItemCount(%player,%item);
   refreshMANA(%clientId, -16);
   refreshAll(%clientId);
}

$AccessoryVar[Magirita, $Weight] = 0;
$AccessoryVar[Magirita, $MiscInfo] = "An icey Womens Drink";
ItemData Magirita
{
   description = "Magirita";
   shapeFile = "armorKit";
   heading = "eMiscellany";
   className = "Accessory";
   shadowDetailMask = 4;
   price = 0;
};
function Magirita::onUse(%player,%item)
{
   %clientId = Player::getClient(%player);

   Player::decItemCount(%player,%item);
   refreshMANA(%clientId, -50);
   refreshAll(%clientId);
}
Title:
Post by: Particle on July 6, 2003 09:20 pm CDT
What's wrong with it?
Title:
Post by: FrieD on July 6, 2003 11:16 pm CDT
i get it to work on my server but then i send it to my friend who has a server and the no one can talk
Title:
Post by: Vorter_X_ on July 7, 2003 08:57 am CDT
if(fetchData(%clientId, "HP") != %hp)


no semi colon???
Title:
Post by: eViL on July 7, 2003 12:46 pm CDT
duh, there is no semi colons on if statements.
Title:
Post by: Particle on July 7, 2003 02:10 pm CDT
hehe

I suppose vort would code like this:

if(1 == 2);
{;
     dbecho(1, "1 equals 2");
};
Title:
Post by: eViL on July 7, 2003 03:45 pm CDT
with 3 errors and an if statement thats never possible.
Title:
Post by: FrieD on July 7, 2003 06:09 pm CDT
umm that still doesnt fix my problem thanx
Title:
Post by: eViL on July 7, 2003 07:49 pm CDT
*sigh* be a little more pushy.  from what you said, its not your problem, its your friends problem.
Title:
Post by: FrieD on July 7, 2003 11:06 pm CDT
ok i see now thanks guys
Title:
Post by: UnderGod on July 7, 2003 11:22 pm CDT
awww.. There is no fun in that.. code it so you can get drunk...

function drunk(%player)
{
     %ds::saynum = "4";
     %ds::say[0] = "*burp*";
     %ds::say[1] = "uhh hahahahahahah";
     %ds::say[2] = "im not as think as you drunk i am";
     %ds::say[3] = "hhhheeeellllloooo";
     %id = Player::GetClient(%player);
     %drunksay = floor(getRandom() * %ds::saynum);
     remotesay(%id, %drunksay);
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Beer
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$AccessoryVar[Beer, $Weight] = 0;
$AccessoryVar[Beer, $MiscInfo] = "Beer";
ItemData Beer
{
description = "Beer";
shapeFile = "armorKit";
heading = "eMiscellany";
className = "Accessory";
shadowDetailMask = 4;
price = 0;
};
function Beer::onUse(%player,%item)
{
%clientId = Player::getClient(%player);

Player::decItemCount(%player,%item);
%hp = fetchData(%clientId, "HP");
refreshHP(%clientId, -0.15);
refreshAll(%clientId);

if(fetchData(%clientId, "HP") != %hp)
UseSkill(%clientId, $SkillHealing, True, True);
}

$AccessoryVar[GodlyBeer, $Weight] = 0;
$AccessoryVar[GodlyBeer, $MiscInfo] = "Beer For the Gods";
ItemData GodlyBeer
{
description = "GodlyBeer";
shapeFile = "armorKit";
heading = "eMiscellany";
className = "Accessory";
shadowDetailMask = 4;
price = 0;
};
function GodlyBeer::onUse(%player,%item)
{
%clientId = Player::getClient(%player);

Player::decItemCount(%player,%item);
%hp = fetchData(%clientId, "HP");
refreshHP(%clientId, -0.6);
refreshAll(%clientId);

if(fetchData(%clientId, "HP") != %hp)
UseSkill(%clientId, $SkillHealing, True, True);
drunk(%player);
}
Title:
Post by: FrieD on July 8, 2003 12:05 am CDT
lol thanks alot
Title:
Post by: Darwin on July 8, 2003 12:24 am CDT
Wow, particle... code?
Title:
Post by: Particle on July 8, 2003 12:50 am CDT
If you don't think I code, you don't know me whatsoever.  Over the past month, I've probably written a couple million bytes of code.
Title:
Post by: UnderGod on July 8, 2003 06:13 am CDT
He was asking if you would code that in.

That is a sorry drunk script, but it gets the idea across.

If I would do something like that, I would have them jump around, say things ect.
Title:
Post by: Vorter_X_ on July 8, 2003 07:22 am CDT
fall down