maartenl / Land-of-Karchan

Where one can change into a hero with a single swipe of his sword.
http://www.karchan.org
GNU General Public License v3.0
7 stars 3 forks source link

Item Creation #187

Closed wastedshame closed 1 year ago

wastedshame commented 2 years ago

For awhile, we were able to make brand new items instead of recycling things over and over. It seems like I did this not too long ago.

Recently (last couple of days?) I get an error message any time I try to create a brand new item. I think it says Internal Error 500?

I need to make some items, but am not currently able to.

maartenl commented 1 year ago

Well, it seems it's working, but it might have changed over time.

Here's a little example I use:

function command(person, totalcommand)
{
  /* command syntax : add item
  person = the person issuing the command
  */
  if (person.getName() != "Karn")
  {
        person.personal("You are not allowed to use this command!<br/>");
        return null;
  }
  // 3185 -> autogrpah
  // 548 -> rainbow pouch
  var item = items.createItem(3185);
  person.addItem(item);
  person.personal("Your inventory has been updated.<br/>");
}

Does that help?

If so I will close the issue.

wastedshame commented 1 year ago

I think I didn't explain properly. When I meant new item, I meant item id?

There for a time, we could create new items that weren't written over old items, then it messed up somewhere.

Examples: I put in a new item id to create, that doesn't exist: image

I hit create and: image

If I hit cancel and don't select a pre-existing item, I get this: image

So I want to create a completely new item. We had that functionality briefly, but it broke somewhere along the line. I want to keep my current items, but still be able to make something new.

If that isn't clear, please respond, and I will answer any questions you have. Sometimes I phrase things awkwardly.

Thank you!