server icon indicating copy to clipboard operation
server copied to clipboard

🐛 <job> Testimony only lasting 1 use.

Open CatsEyeXI opened this issue 2 years ago • 4 comments

  • [x] I have paid attention to this example and will edit again if need be to not break the formatting, or I will be ignored
  • [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated
  • [x] I have read and understood the Contributing Guide

Branch affected by issue

base

Steps to reproduce

Obtain a testimony for any job and enter a fight with Maat. Fail, and you will be required to obtain a new testimony.

Expected behavior

Retail behavior would dictate you get 3 attempts per test.

I was thinking maybe storing a usage counter as a charvar, then checking for it when entering with a testimony? Only once the counter has reached '3' we would player:createWornItem()?

There's probably a more elegant way to do this, but that's how I envisioned it.

CatsEyeXI avatar Aug 09 '22 17:08 CatsEyeXI

Charvar is not a good fit for this, using the 'exdata' arguments and writing the counter into the item is the way. We have examples of that in the quest that gives you mannequins

zach2good avatar Aug 09 '22 17:08 zach2good

https://github.com/LandSandBoat/server/blob/0050386cda37d5dc64e18f150ab6bb36db06b996/scripts/quests/otherAreas/Its_Raining_Mannequins.lua#L166

zach2good avatar Aug 09 '22 17:08 zach2good

Worn Item is just writing a 1 to a certain area of the exdata anyway, so this is an extension of that

zach2good avatar Aug 09 '22 17:08 zach2good

was gonna say we had a function for this that just needs modified and never was https://github.com/LandSandBoat/server/blob/bf62d207fc1253921ad5e3bb9c52fa149ec9d35d/src/map/lua/lua_baseentity.cpp#L3699 we can add a param after item

TeoTwawki avatar Aug 09 '22 17:08 TeoTwawki