Author Topic: Get rid of an item  (Read 1470 times)

They've given you the answer two times.
The freaking pill or grenade script!
Ok lets see you get it? It is not as easy as it sounds.

Yes it is, you can COPY A SECTION OUT and change TWO WORDS and it'll work.

If you can't learn from other scripts, you're not going to get far.

The furcigarette speaks truth.

Yes it is, you can COPY A SECTION OUT and change TWO WORDS and it'll work.
I don't know what section to copy out though, nothing seems like the code to get rid of the item. I've looked at the pill and grenades scripts and I can't find it.

Yes it is, you can COPY A SECTION OUT and change TWO WORDS and it'll work.
I don't know what section to copy out though, nothing seems like the code to get rid of the item. I've looked at the pill and grenades scripts and I can't find it.
12PM as I type this. I will download the script and find the code and time myself.

Quote
function pillImage::onFire(%this,%obj,%slot)
{
   if(!isObject(%obj.client.minigame))
      return;

   for(%i=0;%i<5;%i++)
   {
      %toolDB = %obj.tool[%i];
      if(%toolDB $= %this.item.getID())
      {
         %obj.setDamageLevel(0);
         %obj.emote(HealImage);
         %obj.tool[%i] = 0;
         %obj.weaponCount--;

         messageClient(%obj.client,'MsgItemPickup','',%i,0);
         serverCmdUnUseTool(%obj.client);
         break;
      }
   }
}

O hai.

Check my post time if you want to see how long it took.

Thanks. I'm a novice scripter and don't really understand any code. Locking.