Author Topic: item based script help...  (Read 698 times)

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
item based script help...
« Reply #15 on: September 07, 2010, 04:25:38 am »


               Yeah. That sounds like the "geo_tent" script is firing when the player Acquires the item as well. So if you are using that script, with the event check in it, then you probably have something going on with the other custom module event scripts. Probably some lines in them that say things like:

object oItem = GetItem......;

ExecuteScript(GetTag(oItem), OBJECT_SELF);



This was the older method of doing the tagbased scripting. And now using the 2 methods together causes the issues you are describing. There might not be an easy fix here though. Changing these custom event scripts will probably make a bunch of other stuff quit working if it depends on using that older method.
               
               

               
            

Legacy_seventh_son

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
item based script help...
« Reply #16 on: September 07, 2010, 04:29:19 am »


               yes I do use systems with those lines... any ideas... i think one is CNR and the other is a RUNE book of recall I think.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
item based script help...
« Reply #17 on: September 07, 2010, 04:34:16 am »


               Well..You could try and comment out the "ExecuteScript" lines and see what happens. Can always undo it if something else quits working. I'm not familiar with those other systems but there is a chance that they will still work since you have tag based scripting turned on.
               
               

               
            

Legacy_seventh_son

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
item based script help...
« Reply #18 on: September 07, 2010, 04:39:41 am »


               I can try that, the problem is that CNR is a full crafting sytem, it might take some time to test it and see if it will work with the tag based execute script commands commented out...
               
               

               
            

Legacy_seventh_son

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
item based script help...
« Reply #19 on: September 07, 2010, 04:49:45 am »


               well, I thank you all for your help, It may just be that i am tired but I think rather than screw with these issues that I dont understand completely, I may just start over and keep it simple. sinse I am so early in the process I should be ok.



Again, thanks for your help.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
item based script help...
« Reply #20 on: September 07, 2010, 04:50:45 am »


               Ultimately using both methods is just going to keep causing problems with current systems and any future tag scripting you do. Unfortunately that is one of the problems with using some older systems that require altering your default module events.

One other thing that you could do in those custom event scripts is try putting an exclude list before you execute the script. Something like:

If (GetTag(oItem) == "geo_tent" ||
      GetTag(oItem) == "xxxxxxx" ||
      GetTag(oItem) == "xxxxxxxxxx") return;

Try putting something like that right above the ExecuteScript line. Just keep going with it and put in the tags of the items that you do NOT want to be firing from this event. This way, if the tag of the item matches one of these tags then the script will just end.

Hope that helps. Good luck.
               
               

               


                     Modifié par GhostOfGod, 07 septembre 2010 - 03:56 .
                     
                  


            

Legacy_seventh_son

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
item based script help...
« Reply #21 on: September 07, 2010, 05:01:40 am »


               hhmmm.. not sure what you mean, in what script should I place these lines? and what exactly will they do with the old system of item scripting...?
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
item based script help...
« Reply #22 on: September 07, 2010, 05:13:29 am »


               You would put them in your custom scripts for your module events. Take the "OnAcquireItem" event for example. You said you have some custom event scripts with lines like:

object oItem = GetItem......;
ExecuteScript(GetTag(oItem), OBJECT_SELF);

Well if you did something like this:

object oItem = GetItem......;

If (GetTag(oItem) == "geo_tent" ||
   GetTag(oItem) == "xxxxxxx" ||
   GetTag(oItem) == "xxxxxxxxxx") return;//this is what makes the script stop

ExecuteScript(GetTag(oItem), OBJECT_SELF);

Then the custom event script would just stop before the execute script line runs the tag script for your items.
               
               

               


                     Modifié par GhostOfGod, 07 septembre 2010 - 04:16 .