Jump to content

chriser

Members
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by chriser

  1. dude, you are using chrome, how can it be a hard time to search for that?

    just right click on the elements, then click the last option (something like analyze element) and look at that element. should be easy to determine where this stuff is (e.g. search for the class or the id of the element in the source)

  2. you have to continue the cases for each bag

    function    script    coinbag {
        swtich(getarg(0,0)) //default to 0 to prevent errors
        {
            case 0:
                //For B Grade e.g.
                setarray .@coins[0],<id>,<amt>,<id>,<amt>,...;
                break;
            case 1: //C Grade
                setarray .@coins[0],<id>,<amt>,<id>,<amt>,...;
                break;
            //etc...
            case 2: //D Grade
                setarray .@coins[0],<id>,<amt>,<id>,<amt>,...;
                break;
            //etc...
        }
        .@rnd = rand(getarraysize(.@coins)) / 2;
        getitem .@coins[(.@rnd*2)],.@coins[((.@rnd*2)+1)]
    }
    

    what i am doing here:

    depending with which parameter you call the function, the array is filled with other values, e.g. callfunc "coinbag",1 calls the case for the C Grade Bag, callfunc "coinbag",2 the case for the D Grade Bag. you just have to fill the array with the right ids and values.

    after filling the array, all coin bags do the same: getting your item.

    What i am then doing is a bit tricky. I am dividing the random number I got by 2, then multiplied it by 2 again so that i have the even number, e.g: rand(getarraysize)) returns 3, divided by 2 equals 1 (because of rounding), then mult by 2 again is 2, which would be .@coins[2] which is the ID. the next element is .@coins[3], which is the amount of the item. then you just get the item with getitem.

  3. 16019#°­È­¸ÞÀ̽º#

    take this for example.

    everything should be right now

     

    16027,16027,Death Scythe,4,,,800,200,,2,4,0xFFFFFFFE,1,2,2,4,99,1,8,{},{},{}

    idnum2itemdesctable:

    Quote

     16027#
    <Temporary Weapon Place Holder>
    AllStats + 10
    Defense :^777777 5^000000
    Weight :^777777 10^000000
    Applicable Job :^777777 All Classes^000000
    #

    idnum2itemdisplaynametable:

    Quote

     16027#Death Scythe#

    idnum2itemresnametable:

     16027#°­È­¸ÞÀ̽º#

    itemslotcounttable:

    Quote

    16027#4#

  4. okay, if you want to copy the exact behavior of the script, you have to

    1. add the coin bag here: http://svn.code.sf.net/p/rathena/svn/trunk/db/const.txt (after "IG_CardAlbum_Garment")
    2. increase the maximum MAX_ITEMGROUP here: http://svn.code.sf.net/p/rathena/svn/trunk/src/map/itemdb.h (set it 1 higher then the last id in 1.)
    3. add the items which are in the bag here: http://svn.code.sf.net/p/rathena/svn/trunk/db/re/item_misc.txt (format is described at the top, the groupid equals what you have set in const.txt, e.g IG_B_Grade_Coin_Bag 70, then your groupid is 70 and so on...)
    4. in the itemscript: getrandgroupitem(IG_B_Grade_Coin_Bag),1, so exactly what is in the script of the A Grade Bag.

    If you dont care about the exact implementation:

    function	script	coinbag {
    	swtich(getarg(0,0)) //default to 0 to prevent errors
    	{
    		case 0:
    			//For B Grade e.g.
    			setarray .@coins[0],<id>,<amt>,<id>,<amt>,...;
    			break;
    		case 1: //C Grade
    			...
    			break;
    		//etc...
    	}
    	.@rnd = rand(getarraysize(.@coins)) / 2;
    	getitem .@coins[(.@rnd*2)],.@coins[((.@rnd*2)+1)]
    }
    

    then just call the function coinbag in the script (btw: not tested)

    { callfunc "coinbag",<id>; }
    
  5. for example, but that has nothing to do with the sprite shown when attacking.

    The sprites shown when attacking depends only on the ID (and the viewID i think).

    So if 16027 is in the mace ids (which is 16000 to 16050 i think), you should see a sprite when attacking.

    the entry in resnametable is only for displaying the item image in you inventory and in the item preview (with the description), when laying the item on the floor on when dragging the item somewhere.

  6. do not set the view id in the accessory to 8,you don't need that, just delete it.

    and the idnum2resnametable, you either have to copy a existing resource (e.g. look for a mace, search that id in the resnametable and copy the stuff after the id to 16026#<here>#) or you have a custom one (which i do not assume, so just copy one).

  7. The view ID determine the kind of the weapon, so a mace would be view id 8.

    its the real item id that matters for weapons when wanting to have sprites. your ID needs to be a free id for maces, the view id has to be 8 

    View: Specifies the client-side look for the item.
    • Weapon-type items:
      1. Daggers
      2. One-Handed Swords
      3. Two-Handed Swords
      4. One-Handed Spears
      5. Two-Handed Spears
      6. One-Handed Axes
      7. Two-Handed Axes
      8. Maces
      9. (not used)
      10. Wand/Staff
      11. Bows/Crossbows
      12. Knuckle Weapons
      13. Musical Instruments
      14. Whips
      15. Books
      16. Katars
      17. Revolvers
      18. Rifles
      19. Shotguns
      20. Gatling guns
      21. Grenade launchers
      22. Fuuma shuriken
    • Shield-type items:
      1. Guard, Novice Guard
      2. Buckler
      3. Shield, Holy Guard, Evangelist
      4. Mirror Shield
    • Ammunition-type items:
      1. Arrows
      2. Throw-able daggers
      3. Bullets
      4. Shells
      5. Grenades
      6. Shuriken
      7. Kunai
  8. The view of the Thor Patcher is based on IE, so it caches it. You either have to STRG+F5 reload it, or rename the file to .php.

    I don't know if you have to echo the whole stuff or if you can use just html, but i think you can just write html as long as the file is a .php file (which IE won't cache)

    • Upvote 2
×
×
  • Create New...