Author Topic: items in containers via scripts  (Read 2340 times)

bt_igi

  • Guest
items in containers via scripts
« on: August 27, 2002, 02:00:18 PM »
Hiya folks,
A major feature of Weidu is compatability with other Weidu mods, yes? So while using weidu, I should try and be compatable. Which brings me to my question:
Is it possible to put my new items into pre-existing containers in pre-existing .are files?
I thought appending to the area script, something like
Code: [Select]
IF
  TRUE()
THEN
  RESPONE #100
    GiveItemCreate("item",container,1,0,0)
END
but it doesnt seem to work. The next best thing I can think of is to extract the .are on the users end, and patch the file there, but if another weidu mod is doing / has done the same, wont my patching offset be different?
Hope you can understand, thanks
/bt_igi                    

Extremist

  • Guest
items in containers via scripts
« Reply #1 on: August 28, 2002, 09:02:13 AM »
Your code must look something like this:
Code: [Select]
IF
    TRUE()
THEN
    RESPONSE #100
        ActionOverride("Barrel1",CreateItem("MYITEM",0,0,0))
END

Barrel1 is the name of the container object stored inside ARE file.
You may also with similar command combo (DestroyItem) remove items from containers.
Why is that so? Object type container is treated just like creature, and containers CAN have their own scripts.                    



[!--EDIT|Extremist|Aug 28 2002, 04:05 PM--]

bt_igi

  • Guest
items in containers via scripts
« Reply #2 on: August 28, 2002, 11:39:18 AM »
Ah, ok, thanks a lot! :-) I didnt know objects were treated as containers, but once you see they are, it makes sense.
Another step closer to getting my mod finished :)
/bt_igi                    

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: