| 10-03-2004, 09:00 PM | #1 |
Hi, i am using a Jass code and i was wondering how i figure out what a spell/item's id is. Their example item id's are I000, I001, ect. The spell ones are like AIob, ect... So how do i find out what each item/spell's id is? I have looked everywhere. Thanks. Sample of Code: Trigger Comment: The format is listed below set j=j+1 set udg_ItemArray[Ix(j,1)]="equipable" // bit flag for slots 1=1 2=2 3=4 4=8 5=16 set udg_ItemArray[Ix(j,2)]="Dmg,arm,hp,mana" set udg_ItemArray[Ix(j,3)]="Str,agi,int" set udg_ItemArray[Ix(j,4)]="Ability to add seperate with commas" set udg_ItemArray[Ix(j,5)]="RId,Rlvl,Rstr,Ragi,Rint" //requirements set udg_ItemArray[Ix(j,6)]="pickup version" set udg_ItemArray[Ix(j,7)]="Inventory version" set udg_ItemArray[Ix(j,8)]="(optional) path of model to attach, (optional) spot to attach to" set udg_ItemArray[Ix(j,0)]=getPval(j) //this calculates the priorty or you can put your value Trigger Functions: function InitTrig_ItemArray takes nothing returns nothing local integer i=1 local integer j=0 local string array ap //************************************************************** // Default model and attachment point // Because DT4:A is all about flexibility if you are lazy and // don't want to keep copying fields I set up these convience // constants for you. You enter what the default model is then // defualt attachment point, seperate with commas. // If you leave your items line 8 blank it'll use the default // If you give it only one field it'll use that model and the default attachment point // If you give it two fields it'll use that model and that attachment point // If you only want to use a different attachment point use -1 for the model. // you can use -1 for defualt model as well. set ap[1]="" set ap[2]="" set ap[3]="Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl,weapon" set ap[4]="" set ap[5]="" loop exitwhen i>5 set udg_LastIndex[i]=StoI(ap[i]) set i=(i+1) endloop //************************************************************** // Required Item //generic item used to signify there is indeed an item there //don't remove //************************************************************** //0 Generic Item set udg_ItemArray[Ix(j,1)]="31" set udg_ItemArray[Ix(j,2)]="0,0,0,0" set udg_ItemArray[Ix(j,3)]="0,0,0" set udg_ItemArray[Ix(j,4)]="" set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]="77" //no pickup version set udg_ItemArray[Ix(j,7)]=I2S('I000') set udg_ItemArray[Ix(j,8)]="-1,overhead" set udg_ItemArray[Ix(j,0)]=getPval(j) //************************************************************** // Custom Items here // See above for how to set up your own item //************************************************************** set j=j+1 //1 The RING set udg_ItemArray[Ix(j,1)]="31" set udg_ItemArray[Ix(j,2)]="500,500,500,500" set udg_ItemArray[Ix(j,3)]="500,500,500" set udg_ItemArray[Ix(j,4)]=I2S('Apiv')+","+I2S('Apig') //sure the ring never did it but its fun! set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]=I2S('I001') set udg_ItemArray[Ix(j,7)]=I2S('I002') set udg_ItemArray[Ix(j,8)]="" set udg_ItemArray[Ix(j,0)]=getPval(j) set j=j+1 //2 The Cool Sword set udg_ItemArray[Ix(j,1)]="4" set udg_ItemArray[Ix(j,2)]="44,0,0,0" set udg_ItemArray[Ix(j,3)]="0,0,0" set udg_ItemArray[Ix(j,4)]=I2S('AIob') set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]=I2S('I006') set udg_ItemArray[Ix(j,7)]=I2S('I007') set udg_ItemArray[Ix(j,8)]="" set udg_ItemArray[Ix(j,0)]=getPval(j) set j=j+1 //3 The Sh Sword set udg_ItemArray[Ix(j,1)]="4" set udg_ItemArray[Ix(j,2)]="20,0,0,0" set udg_ItemArray[Ix(j,3)]="0,0,0" set udg_ItemArray[Ix(j,4)]="" set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]="75" set udg_ItemArray[Ix(j,7)]=I2S('I008') set udg_ItemArray[Ix(j,8)]="units\\critters\\Sheep\\Sheep.mdl" set udg_ItemArray[Ix(j,0)]=getPval(j) set j=j+1 //4 The Good Shield set udg_ItemArray[Ix(j,1)]="8" set udg_ItemArray[Ix(j,2)]="0,10,0,0" set udg_ItemArray[Ix(j,3)]="0,0,0" set udg_ItemArray[Ix(j,4)]="" set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]="76" set udg_ItemArray[Ix(j,7)]=I2S('I009') set udg_ItemArray[Ix(j,8)]="" set udg_ItemArray[Ix(j,0)]=getPval(j) set j=j+1 //5 The better shield set udg_ItemArray[Ix(j,1)]="8" set udg_ItemArray[Ix(j,2)]="0,16,0,0" set udg_ItemArray[Ix(j,3)]="0,0,0" set udg_ItemArray[Ix(j,4)]="" set udg_ItemArray[Ix(j,5)]="0,0,0,0,0" set udg_ItemArray[Ix(j,6)]=I2S('I00A') set udg_ItemArray[Ix(j,7)]=I2S('I00B') set udg_ItemArray[Ix(j,8)]="" set udg_ItemArray[Ix(j,0)]=getPval(j) endfunction |
| 10-03-2004, 09:33 PM | #2 |
Go into the editor where you casn see the spells/items listed and hit command-D. On a Mac. Alt-D most likely on PCs. |
| 10-03-2004, 10:01 PM | #3 |
ctrl not alt, alt is like option, not used so much. what does Ix stand for? (i know what it does) |
| 10-04-2004, 12:11 AM | #4 |
Index. It was a function that emerged from my frantic race against Unlucky Footman in our contest to prove who could figure out how to use multiplayer dialogs in jass, like two and a quater years ago. I discovered that we couldn't detect who clicked it but we could luanch a dialog for each different player. So we needed to have buttons for each player in an array. He simplified it by a 2d array structure using C like arrays. I simplified the function from Index to Ix. (I'm a sore loser). He won the dialog race, but then I beat him with the funniest movie ever made involving sheeps as hats. (b.w3m). from the I'm suprised that people still have an interested in DT4a. You should look at the gigantic thread in the repository about it. |
| 10-04-2004, 08:17 AM | #5 |
where's the sheep movie, i cant' find it? and i tried a few searches and also looked through every thread you ever made (cool stuff! esp the Magical Date Ex review). |
| 10-04-2004, 05:11 PM | #6 |
Its so old and probably not even funny any more. It was uploaded before the uploads got curropted. It was part of a series we had of movies called "the No Effort, 1 hour movie contest". We were rivals so we borrowed and modified each others works heavily. He started with his original, and I changed it some more. |
