PDA

View Full Version : Special restore pots [562]



Geo
July 14th, 2010, 20:56
Look for "private void itemselect" in your itempackethandler.java

You should see something like:


case 139:
case 141:
case 143:
if (player.potDelay == 0) {
player.getInventory().deleteItem(itemId, 1);
if (itemId != 143) {
player.getInventory().addItem(itemId+2, 1);
} else {
player.getInventory().addItem(229, 1);
}
int abc = (int) ((player.getSkills().getLevelForXp(5)/4) + 7);
player.getSkills().RestorePray(abc);
player.animate(829, 0);
player.combatDelay += 4;
player.potDelay = 3;
}
break;
after the break add this:


case 14217:
if (player.potDelay == 0) {
player.getInventory().deleteItem(14217, 1);
player.getInventory().addItem(14219, 1);
player.specialAmount = 25;
player.animate(829, 0);
player.sm("Your special has been restored.");
player.potDelay = 30;
}
break;
case 14219:
if (player.potDelay == 0) {
player.getInventory().deleteItem(14219, 1);
player.getInventory().addItem(14221, 1);
player.specialAmount = 25;
player.animate(829, 0);
player.sm("Your special has been restored.");
player.potDelay = 30;
}
break;
case 14221:
if (player.potDelay == 0) {
player.getInventory().deleteItem(14221, 1);
player.getInventory().addItem(14223, 1);
player.specialAmount = 25;
player.animate(829, 0);
player.sm("Your special has been restored.");
player.potDelay = 30;
}
break;
case 14223:
if (player.potDelay == 0) {
player.getInventory().deleteItem(14223, 1);
player.getInventory().addItem(14225, 1);
player.specialAmount = 25;
player.animate(829, 0);
player.sm("Your special has been restored.");
player.potDelay = 30;
}
break;
case 14225:
if (player.potDelay == 0) {
player.getInventory().deleteItem(14225, 1);
player.getInventory().addItem(229, 1);
player.specialAmount = 25;
player.animate(829, 0);
player.sm("Your special has been restored.");
player.potDelay = 30;
}
break;

if you don't have 14217-14225 in your itemdefinitions add this in your itemdefinitions.xml:


<itemDefinition>
<price>
<minPrice>0</minPrice>
<maxPrice>0</maxPrice>
<normPrice>0</normPrice>
</price>
<bonus>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</bonus>
<examine>A strong potion.</examine>
<id>14217</id>
<stackable>false</stackable>
<name>extreme something (5)</name>
<noted>false</noted>
<equipId>-1</equipId>
</itemDefinition>
<itemDefinition>
<price>
<minPrice>0</minPrice>
<maxPrice>0</maxPrice>
<normPrice>0</normPrice>
</price>
<bonus>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</bonus>
<examine>A strong potion.</examine>
<id>14219</id>
<stackable>false</stackable>
<name>extreme something (4)</name>
<noted>false</noted>
<equipId>-1</equipId>
</itemDefinition>
<itemDefinition>
<price>
<minPrice>0</minPrice>
<maxPrice>0</maxPrice>
<normPrice>0</normPrice>
</price>
<bonus>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</bonus>
<examine>A strong potion.</examine>
<id>14221</id>
<stackable>false</stackable>
<name>extreme something (3)</name>
<noted>false</noted>
<equipId>-1</equipId>
</itemDefinition>
<itemDefinition>
<price>
<minPrice>0</minPrice>
<maxPrice>0</maxPrice>
<normPrice>0</normPrice>
</price>
<bonus>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</bonus>
<examine>A strong potion.</examine>
<id>14223</id>
<stackable>false</stackable>
<name>extreme something (2)</name>
<noted>false</noted>
<equipId>-1</equipId>
</itemDefinition>
<itemDefinition>
<price>
<minPrice>0</minPrice>
<maxPrice>0</maxPrice>
<normPrice>0</normPrice>
</price>
<bonus>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</bonus>
<examine>A strong potion.</examine>
<id>14225</id>
<stackable>false</stackable>
<name>extreme something (1)</name>
<noted>false</noted>
<equipId>-1</equipId>
</itemDefinition>

posted this 'cause someone requested...

Toxic ™
July 14th, 2010, 21:31
nice man release geo sucks your releasing all your good stuff but maybe some noob can take it and make it into something even more ghetto someday

Geo
July 15th, 2010, 00:05
nice man release geo sucks your releasing all your good stuff but maybe some noob can take it and make it into something even more ghetto someday
yeah after i released my source, there's not really any point of my hiding any of the things i had on my server...

lol123453
July 15th, 2010, 04:12
wow where did you release your source geo

Toxic ™
July 15th, 2010, 04:17
on Runelocus check the downloads section

pixelpwn
July 15th, 2010, 04:31
thx man sooooo much

Darkness Revolt
July 15th, 2010, 07:18
This is not hard at all, but nice job. You can also use potions.py for adding the stat editing

420
July 15th, 2010, 07:30
Never thought about a potion that restores spec, this is clever :D

Geo
July 15th, 2010, 16:39
This is not hard at all, but nice job. You can also use potions.py for adding the stat editing

you get errors if you use potions.py i think

edit: nvm i think i might've misunderstood what you said lol

Ninga Nun
July 15th, 2010, 18:39
Nice job ;)

David
July 15th, 2010, 20:10
Good job, but its actually not so hard :P

Niator
July 15th, 2010, 22:52
Its a problem cuz if u want 100 spec and already got 50 and drink the potion, you get 25, so if you change the "specialAmount = 25 to 100 than u get full spec for each dose.
And I liked that you got to wait 30 sec to drink it again ^^

Geo
July 16th, 2010, 01:05
Its a problem cuz if u want 100 spec and already got 50 and drink the potion, you get 25, so if you change the "specialAmount = 25 to 100 than u get full spec for each dose.
And I liked that you got to wait 30 sec to drink it again ^^

there's a 30 sec delay on rs and it only restores 25 spec just like on rs, and could you rephrase what you said, it didn't make any sense to me

Niator
July 16th, 2010, 12:37
there's a 30 sec delay on rs and it only restores 25 spec just like on rs, and could you rephrase what you said, it didn't make any sense to me

Sorry my english sucks cuz I'm from Norway xD.
But the potion does NOT heal, it just "transfrom" you current special amount to 25.