Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- item script hatespell
- {
- void run(int errSfx, int affectedItemClass, int multiplier)
- {
- bool do_disable;
- if ( Game->Counter[this->CostCounter] < this->Cost )
- {
- Audio->PlaySound(errSfx); Quit();
- }
- int tempitmpower[256];
- for ( int q = 0; q < 256; ++q )
- {
- itemdata theItem = Game->LoadItemData(q);
- if ( theItem->Class == affectedItemClass )
- {
- tempitmpower[q] = theItem->Power+1;
- theItem->Power *= multiplier;
- }
- }
- while((Game->Counter[this->CostCounter] -= this->Cost) > 0)
- {
- if (( Hero->PressA && Hero->ItemA == this->ID ) ||( Hero->PressB && Hero->ItemB == this->ID ) )
- {
- break;
- }
- Waitframe();
- }
- Audio->PlaySound(this->UseSound);
- for ( int q = 0; q < 256; ++q )
- {
- itemdata theItem = Game->LoadItemData(q);
- if ( theItem->Class == affectedItemClass )
- {
- if ( tempitmpower[q] )
- {
- theItem->Power = tempitmpower[q]-1;
- }
- }
- }
- Quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement