//Phantom.zh //Aplha v0.1 //Automates running an FFC script from any item, using its Level, and itemdata to set script args. void Phantom(){ int it_scriptA; itemdata itA = GetEquipmentA(); if ( itA->Level > 10 && Link->PressA ){ int args[]={ itA-> , itA-> , itA-> , itA-> , itA-> }; it_ScriptA = itA->Level - 10; RunFFCScript(it_ScriptA,args); } int it_scriptB; itemdata itB = GetEquipmentB(); if ( itB->Level > 10 && Link->PressB ){ int args[]={ itB-> , itB-> , itB-> , itB-> , itB-> }; it_ScriptB = itB->Level - 10; RunFFCScript(it_ScriptB,args); } } //* We can use the following itemdata attributes to set flags for the ffc script: // int book_dmg = book->Power; // int book_ltype = book->Amount; //(Item Editor->Pickup: Increase Amount) // int book_sprite = book->MaxIncrement; //(Item Editor->Pickup: Increase Counter Max) // int book_speed = book->Max; //(Item Editor->Pickup: But Not ABove) // int book_useFFC = book->Level; //(Item Editor->Data: Level) // int book_sfx = book->UseSound; //(Item Editor->Action: Sound) // int book_layer = book->Counter; //The selectionhere is extremely limited, 0 to 31. // int book_deadState = book->Family; //The range here is 0 to 254. Use IC_ constants for values 0 to 88. //Values 89 through 254 are equivalent to the zz### item class number. //We can use counter refs that are set at zero, as arguments, because the book item is never directly used. //Silently add the book to Link->Items, with an indirect pickup, so that the counter refs are never utilised. //void run(int dmg, int ltype, int flameLType, int flameSprite, int flameSFX, int flameLifespan, int flameSpeed. int flameFFC){ // ->InitD //The D0 to D7 args // ->Family //The item 'class' void SetPhantomAttribute(){ } float GetPhantomAttribute(int flag){ } float PhantomAttributes[16]; //The itemdata attributes. float PhantomDArgs[8]; float PhantomAttrinsOnly[7]; int PhantomNameBuffer[255]; //To store the item name from the Item Editor //Stores the attributes of an item into the array. void _StorePhantomAttributes(int itemID, int slotType){ //Slot Types ALL, DARGS, ATTRS itemdata it = Game->LoadItemData(it); int pow = it->Power; //Attr 0 int amt = it->Amount; //Attr 1 int max_inc = it->MaxIncrement; //Attr 2 int max = it->Max; //Attr 3 int snd = it->UseSound; //Attr 4 int ctr = it->Counter; //Attr 5 int iclass = it->Family; //Attr 6 int d0 = it->InitD[0]; //Attr 7 int d1 = it->InitD[1]; //Attr 8 int d2 = it->InitD[2]; //Attr 9 int d3 = it->InitD[3]; //Attr 10 int d4 = it->InitD[4]; //Attr 11 int d5 = it->InitD[5]; //Attr 12 int d6 = it->InitD[6]; //Attr 13 int d7 = it->InitD[7]; //Attr 14 int lvl = it->Level; //Attr 15 int attrs[16]={pow,amt,max_inc,max,snd,ctr,iclass,d0,d1,d2,d3,d4,d5,d6,d7}; //Find empty slots in array, if needed. int adjust_slot; int adjust_slot_dargs; int adjust slot_attrs_only; for ( int q = 0; q < SizeOfArray(attrs); q++ ) { PhantomAttributes[q+adjust_slot] = attrs[q]; PhantomDArgs[q+adjust_slot+dargs] = attrs[q+7]; } for ( int q = 0; q < 6; q++ ) PhantomAttrinsOnly[q+slot_attrs_only] = attrs[q]; } //Weapon Style Flags //Action Flags (Direction, Animation)