i know the ID of a item and i want a code to have is Tile and cset in a integer
(itemID = 127) for the variable init
void run(int indexshop, int itemID, int prix, int Yvisualoffset, int typesell, int o, int NoCounter, int Famille){
.....
int ItemTile;
int ItemCSet;
int message;
....
itemdata idata = Game->LoadItemData(itemID);
(now i want the Tile and cset of the item itemID)
ItemTile = ????? // idata->Tile don't work
itemCSet = ???? // idata ->CSet don'T work
message = o;
ItemPopup(iitemTile, itemCSet, iitemID, message);
this is the fonction is do well if i enter the init variable..
void ItemPopup(int itemTile, int cset, int itemID, int message){
bool cond;
if (!ITEM_PICKUP[itemID]){
cond = true;
}
while(cond){
while (!ITEM_PICKUP[itemID]){
Waitframe();
}
Screen->Rectangle(6, 0, 0, 256, 512, 0x00, 1, 0, 0, 0, true, 128); //Clear the bitmap
Screen->DrawTile(6, 24, 24, 51740, 12, 6, 5, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Draw the item frame
Screen->FastTile(6, 32, 32, tile, cset, OP_OPAQUE); //Draw the item
cond = false;
Screen->Message(message);
}
}