Jump to content

Photo

I'm in need of a script, please!


  • Please log in to reply
9 replies to this topic

#1 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 09 November 2007 - 05:54 PM

I'm in need of a script, That would make it possible to modify links sprites per dmap. So basically adding link sprite editor to dmap editor. This way I can modify link to look different on separate dmaps. If any one thinks there able to script this let me know please.

#2 Bayta

Bayta

    Follower of Destiny

  • Members
  • Real Name:Robin Evans
  • Location:Suffolk County, NY

Posted 09 November 2007 - 06:13 PM

I'm sorry, but last time I checked, we don't have active Link Tile Mods in ZScript. icon_frown.gif

#3 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 09 November 2007 - 06:14 PM

CODE
// ======================================================
// TAKE_ITEM = Take away the item specified by D0.
// if D1 not set to 0, then give him the item specified by D0
// =====================================================

ffc script take_item{

    void run(int target_item, int take_or_give){

        if (take_or_give == 0){

            Link->Item[target_item] = false;

        }
        else{

            Link->Item[target_item] = true;
        }
    
    } // end of void run
} // end of script



use dummy items and link tile mod.

script by C-Dawg

#4 Joe123

Joe123

    Retired

  • Members

Posted 09 November 2007 - 06:23 PM

right. I can do this quite easily with the global script, but you'll need some knowledge of scripting, and it'll require a lot of personal modification.

CODE
gobal script dmapmodifier{
    void run(){
        while(true){
            if(Game->GetCurDMap(0) == true){ // set here the number of the DMap where you want Link's tiles to be modified
                Link->Item[0] = true; // set here the ID number of the item with the Link Tile Modifier
            }
            else{Link->Item[0] = false; // set the same number here
            }
        }
    }
}


I think the syntax on that should all be correct, but I haven't tested it, so if you try compiling it and it doesn't work tell me what it says, and I'll fix it.

Now, what that script will do is:
Check whether Link is on a certain Dmap ( you specify this by changing the 0 in the noted line)
Then if he is, give him the item with the LTM( you specify this on the second noted line)
And if hes not, remove it (you must also set the same number on the third noted line)

If you want it to happen for more Dmaps, after the second '}', copy in this part of the script again:
CODE
            if(Game->GetCurDMap(0) == true){ // set here the number of the DMap where you want Link's tiles to be modified
                Link->Item[0] = true; // set here the ID number of the item with the Link Tile Modifier
            }
            else{Link->Item[0] = false; // set the same number here
            }

then set it with the correct integers. All integers that I've put for you to define personally are set to '0' in what I've written.

That should be just about it really. I'll be surprised if it all works fine and dandy straight off though, come back with problems and I'll see what I can do.

EDIT: Woaaah, two replies since when I started writing mine and when I finished...

Edited by Joe123, 09 November 2007 - 06:27 PM.


#5 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 09 November 2007 - 11:33 PM

ok which one do I import it on, I picked ASM global and I got this:
IPB Image



#6 Joe123

Joe123

    Retired

  • Members

Posted 10 November 2007 - 05:12 AM

Ahh, back to basics. Sorry, I assumed you might already know how to use scripts.

Right.
Open notepad.
On the first line, write import "std.zh"
Then copy in the script.
Save it, and change the file extension to '.z'

Go into zquest, and go to Tools->Scripts->Compile Zscript.
(just for refernce, ZC can use two scripting languages, Zscript and ZASM. My script is written in Zscript)
Click on Import and find the .z file.
Then press compile.
Click the 'global' tab after opening it, and there should be a script on the right called 'dmapmodifier'. Put it on the second slot, below ~INIT.

Then press ok. Obviously, first you have to set those integers in the script that I flagged up to the correct values.

And that should be able it really. Go test it and see if it works.

#7 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 10 November 2007 - 10:28 PM

how do I change .txt extension to .z?

#8 Plissken

Plissken

    What's with these homies dissing our girls?

  • Members

Posted 10 November 2007 - 10:33 PM

When you are saving the notepad file put the name as *****.z

***** being the file name. It will then automatically make the extension .z

#9 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 10 November 2007 - 11:57 PM

Plissken I did that but it did not show up in the folder icon_shrug.gif

#10 Joe123

Joe123

    Retired

  • Members

Posted 11 November 2007 - 05:32 AM

Right. You don't have filetype extensions shown then.
I did it when I first got my computer because I cannot stand having restrictions put on my computer because Microsoft assume as a default that users don't know anything about computers.

If you're using a windows system:
Go into a foler, and press 'Tools->Folder Options'
Click on the View tab
And uncheck the 'Hide extensions for known filetypes' box.

Well, that's XP. If you have another windows system it'll be simmilar (98 is the same but I don't know vista) but I have no idea about apple or whatever.

And then save the file as .txt, then change the filename and change the .txt to .z


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users