Remove Item from Shop after purchasing?

Bennittow

New Member
Reaction score
1
Im using an Item to activate a Quest. When the Item is purchased the quest starts.
But i want the Item to be removed from the shop. So it cant be sold anymore.
Any ideas??
 

Necrach

You can change this now in User CP.
Reaction score
62
There is no smooth way I can think of, but I guess you could replace the shop with another one lacking that item. Would be a lot of replacement possibilities if there is several of these Quest starting items in one shop, though :p
 

BloodySkullz

Active Member
Reaction score
10
Trigger Functions
>Neutral Buildings
>Remove Item-Type(From All Marketplace/From Marketplace)

Set desired item type to remove it
 

Magthridon96

Member
Reaction score
2
JASS:
library RemoveQitem
    private function remove takes nothing returns boolean
        local integer id = GetItemTypeId(GetManipulatedItem())
        if id == 'Some Item Id' then
            call SetPlayerTechMaxAllowed(GetTriggerPlayer(),id,-1)
        endif
        return false
    endfunction
    private module Init
        private static method onInit takes nothing returns nothing
            local trigger t = CreateTrigger()
            call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_PICKUP_ITEM)
            call TriggerAddCondition(t,Condition(function remove))
            set t = null
        endmethod
    endmodule
    private struct Inits extends array
        implement Init
    endstruct
endlibrary


Your welcome :D
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Why the BJ? And the struct?
Also, you'd need a new trigger/a bunch of or's for your script.
Just remove the "sold item" from the shops.
Can easily be done in GUI, assuming the OP doesn't use JASS.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top