Dark Age Games
Home Dark Age EX Dark Age 2 Message Board Fan Art FAQ Kelzar Mage DALpedia MS Forum
Board Index Dark Age General Bug Report Website Off Topic Register User Edit User User List Search

Item Menu
Posted by: Tidus
01:16:54 12-08-2005

I cannot figure this out, once an item is all used up the slot doesnt refresh. Use the 1st item until it's gone then keep hitting enter, you'll understand then.

#include(methods.prg)
#item[1]$="Shoe"
#itemcount[1]!=3
#item[2]$="Sock"
#itemcount[2]!=2
:itemtop
#fontx(Courier,12,255,255,255)
#bitmap(Menu/Item/bkg.png)
#y3!=10
#x3!=12
#x4!=20
#for(num!=1;num!<31;num!=num!+1)
{
#castlit(num!,num$)
#if(itemcount[num$]!>99)
{
#itemcount[num$]!=99
}
#if(itemcount[num$]!=0)
{
#item[num$]$=""
}
#if(item[num$]$~="")
{
#castlit(itemcount[num$]!,itemcount[num$]$)
#text(x3!,y3!,item[num$]$)
#text(x4!,y3!,itemcount[num$]$)
#y3!=y3!+1
#if(y3!=25)
{
#y3!=10
#x3!=32
#x4!=40
}
}
}
#kill(x3!)
#kill(x4!)
#kill(y3!)
#itemdone!=1
#x3!=88
#y3!=110
#count!=1
#count2!=16
#savescreen()
#while(itemdone!=1)
{
#text(5,5,count!)
#text(5,6,count2!)
#setimage(Menu/Item/cursor.png,x3!,y3!,20,9)
#wait(i$)
#if(i$="DOWN")
{
#y3!=y3!+12
#count!=count!+1
#count2!=count2!+1
#if(y3!>278)
{
#count!=1
#count2!=16
#y3!=110
}
#restorescreen()
}
#if(i$="UP")
{
#y3!=y3!-12
#count!=count!-1
#count2!=count2!-1
#if(y3!<110)
{
#count!=15
#count2!=30
#y3!=278
}
#restorescreen()
}
#if(i$="LEFT")
{
#x3!=x3!-240
#if(x3!<88)
{
#x3!=88
}
#restorescreen()
}
#if(i$="RIGHT")
{
#x3!=x3!+240
#if(x3!>328)
{
#x3!=328
}
#restorescreen()
}
#if(i$="ENTER")
{
#if(x3!=88)
{
#mwincls()
#castlit(count!,count$)
#mwin(item[count$]$)
#mwin(itemcount[count$]!)
#itemcount[count$]!=itemcount[count$]!-1
#mwin(itemcount[count$]!)
}
#if(x3!=328)
{
#castlit(count2!,count2$)
#mwin(item[count2$]$)
}
#kill(itemcount[num$]$)
#kill(item[num$]$)
#itemdone!=0
#branch(:itemtop)
}
}

Me>You
Edit Post