project-topaz / topaz

Server emulator for FFXI
Other
160 stars 224 forks source link

Windurst Quest - Rock Racketeer (Mythril Seam 100% Pickaxe break rate & no Sharp Stone) #441

Open Solarsurge opened 4 years ago

Solarsurge commented 4 years ago

I have:

Additional Information (Steps to reproduce/Expected behavior) : Broke 99 consecutive Pickaxes on the Mythril Seam and only able to dig up Mine Gravel. img_20200325_025908 img_20200325_025912

TeoTwawki commented 4 years ago

only able to dig up Mine Gravel.

That part is normal. the break rate is not.

Solarsurge commented 4 years ago

I know it's RNG and mine gravel is definitely more common, so if it's just terrible luck so be it, but after going 0/99 swings on the Sharp Stone I figured I'd mention it just to confirm it's actually in the table for the correct seam.

TeoTwawki commented 4 years ago
require("scripts/globals/npc_util")
-----------------------------------

function onTrade(player, npc, trade)
    if npcUtil.tradeHas(trade, 605) then -- pickaxe
        if player:getFreeSlotsCount() > 0 then
            if math.random() < 0.47 then
                if player:getCharVar("rockracketeer_sold") == 5 then
                    player:startEvent(51, 12, 598) -- Sharp Stone
                else
                    player:startEvent(43, 12, 0, 597) -- Mine Gravel
                end
            else
                player:startEvent(47, 8, 598) -- pickaxe breaks
            end
        else
            player:startEvent(53) -- cannot carry any more
        end
    else
        player:startEvent(32) -- need a pickaxe
    end
end

function onTrigger(player, npc)
    player:startEvent(30, 12, 0, 597)
end

function onEventUpdate(player, csid, option)
end

function onEventFinish(player, csid, option)
    if csid == 51 and npcUtil.giveItem(player, 598) then
        player:confirmTrade()
    elseif csid == 43 and npcUtil.giveItem(player, 597) then
        player:confirmTrade()
    elseif csid == 47 then
        player:confirmTrade()
    end
end
TeoTwawki commented 4 years ago

so, if your rockracketeer_sold var is exactly 5, you will get a sharp stone. otherwise you will always get mine gravel.

TeoTwawki commented 4 years ago

IMO, the script needs to take the mining rate settings into account for break rate and success rate to meet expectations

Solarsurge commented 4 years ago

I'm not sure what the rockracketeer_sold var possibilities are. I just know you sell the original sharp grey stone (key item) that Nanaa Mihgo gives you to the Goldsmithing guild in Bastok to enable the next part of the quest, where Varun wonders where his stone went, and that finally enables you to mine the Sharp Stone. I've done all that. So, if I'm reading that code correctly, doesn't that mean I should just get the Sharp Stone? Because I didn't.

TeoTwawki commented 4 years ago

https://github.com/project-topaz/topaz/search?q=rockracketeer_sold&unscoped_q=rockracketeer_sold

I'm not seeing where it is set to 5 actually.. nvm found it

    if rockRacketeer == QUEST_ACCEPTED and rockRacketeerCS == 3 then
        player:startEvent(100) -- talk about lost stone
    elseif rockRacketeer == QUEST_ACCEPTED and rockRacketeerCS == 4 then
        player:startEvent(101, 0, 598) -- send player to Palborough Mines
    else
        player:startEvent(432)
    end
function onEventFinish(player,csid,option)
    if csid == 100 then
        player:setCharVar("rockracketeer_sold", 4)
    elseif csid == 101 then
        player:setCharVar("rockracketeer_sold", 5)
    elseif csid == 102 and npcUtil.completeQuest(player, WINDURST, tpz.quest.id.windurst.ROCK_RACKETEER, {gil=2100, var="rockracketeer_sold"}) then
        player:confirmTrade()
    end
end
TeoTwawki commented 4 years ago

so you I think need to check what your var is, cos it looks like maybe you missed a step or fell victim to the bug where something in the database doesn't get updated.

Solarsurge commented 4 years ago

Option 2. It didn't update.

ibm2431 commented 4 years ago

@Solarsurge To confirm: Were you able to progress with the quest by trying to speak with Varun again?

Solarsurge commented 4 years ago

Varun has multiple dialogues depending on where you are in the quest. After speaking with Nanaa Mihgo, you are only supposed to need to talk to Varun once, but it seems you may need to talk to him twice. I just talked to him twice back to back and he gave me two different messages. First about the Sharp Stone, then his original non-quest message. After the repeat original non-quest message, I was able to mine the Sharp Stone.

Varun1 Varun2 SharpStone

TeoTwawki commented 4 years ago

possibly optional or reminder message mistakenly set to required via variable updates.