• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

I have with a system, need help pls (2)

Status
Not open for further replies.
Level 4
Joined
Aug 3, 2008
Messages
80
Hey all

i have a problem with a systems, (it wasn't made by me) i have it from an other mape (Molten Core v9 WOTLK....the mape is unprotected).

in the molten core mape the system works without problems, but i wanted to use the system in my mape and it doesn't work:confused:can somebody help me pls?!


2 System: Roll for item system
The Script:
JASS:
function GetClass takes unit u returns string
    local string class = GetUnitName(u)
    if(SubStringBJ(class,1,11)=="Dwarf |cFF8") or (SubStringBJ(class,1,12)=="Orc |cFF805")then
        set class="Warrior"
    elseif(SubStringBJ(class,1,11)=="Dwarf |cFF0") or (SubStringBJ(class,1,12)=="Undead |cFF0") then
        set class="Hunter"
    elseif(SubStringBJ(class,1,13)=="Human |cFFFF8") then
        set class="Paladin"
    elseif(SubStringBJ(class,1,11)=="Orc |cFFFF8") then
        set class="Shaman"
    elseif(SubStringBJ(class,1,13)=="Human |cFF80F") or (SubStringBJ(class,1,11)=="Troll |cFF8") then
        set class="Mage"
    elseif(SubStringBJ(class,1,13)=="Human |cFFFFF") or (SubStringBJ(class,1,12)=="Undead |cFFF") then
        set class="Priest"
    elseif(SubStringBJ(class,1,17)=="Night Elf |cFFFFF") or (SubStringBJ(class,1,11)=="Troll |cFFF") then
        set class="Rogue"
    elseif(SubStringBJ(class,1,13)=="Human |cFF800") or (SubStringBJ(class,1,11)=="Orc |cFF800") then
        set class="Warlock"
    elseif(SubStringBJ(class,1,17)=="Night Elf |cFFFF8") or (SubStringBJ(class,1,2)=="Ta") then
        set class="Druid"
    endif
    return class
endfunction

function IsValidClassForItem takes string i, string c returns boolean
    set i=SubStringBJ(i,11,StringLength(i)-2)
    // DEBUG
//    call DisplayTextToPlayer(Player(0),0,0,i + c)
    if (c=="") then
        return false
    endif
    if(i=="Crappy Blue Armor") or (i=="Crappy Blue Boots") or (i=="Crappy Blue Gloves") or (i=="Crappy Blue Helm") then
        return true
    endif
    if(c=="Warrior")then
        if(i=="Bracers of Might") or (i=="Breastplate of Might") or (i=="Gauntlets of Might") or (i=="Helm of Might") or (i=="Pauldrons of Might") or (i=="Sabatons of Might") or (i=="Drillborer Disk") or (i=="Obsidian Edged Blade") then
            return true
        else
            return false
        endif
    elseif(c=="Mage")then
        if(i=="Arcanist Bindings") or (i=="Arcanist Boots") or (i=="Arcanist Mantle") or (i=="Arcanist Crown") or (i=="Arcanist Gloves") or (i=="Arcanist Robes") or (i=="Sorcerous Dagger") or (i=="Staff of Dominance") or (i=="Azuresong Mageblade") then
            return true
        else
            return false
        endif
    elseif(c=="Druid")then
        if(i=="Cenarion Boots") or (i=="Cenarion Bracers") or (i=="Cenarion Gloves") or (i=="Cenarion Helm") or (i=="Cenarion Spaulders") or (i=="Cenarion Vestments") or (i=="Wild Growth Spaulders") or (i=="Staff of Dominance") or (i=="Finkle's Lava Dredger") or (i=="Aurastone Hammer") then
            return true
        else
            return false
        endif
    elseif(c=="Priest")then
        if(i=="Boots of Prophecy") or (i=="Circlet of Prophecy") or (i=="Gloves of Prophecy") or (i=="Mantle of Prophecy") or (i=="Robes of Prophecy") or (i=="Vampraces of Prophecy") or (i=="Staff of Dominance") or (i=="Sorcerous Dagger") then
            return true
        else
            return false
        endif
    elseif(c=="Hunter")then
        if(i=="Giantstalker's Boots") or (i=="Giantstalker's Bracers") or (i=="Giantstalker's Breastplate") or (i=="Giantstalker's Epaulets") or (i=="Giantstalker's Gloves") or (i=="Giantstalker's Helmet") or (i=="Striker's Mark") or (i=="Obsidian Edged Blade") then
            return true
        else
            return false
        endif
    elseif(c=="Rogue")then
        if(i=="Nightslayer Boots") or (i=="Nightslayer Bracelets") or (i=="Nightslayer Chestpiece") or (i=="Nightslayer Cover") or (i=="Nightslayer Gloves") or (i=="Nightslayer Shoulder Pads") or (i=="Gutgore Ripper") or (i=="Core Hound Tooth") then
            return true
        else
            return false
        endif
    elseif(c=="Warlock")then
        if(i=="Felheart Bracers") or (i=="Felheart Gloves") or (i=="Felheart Horns") or (i=="Felheart Robes") or (i=="Felheart Shoulder Pads") or (i=="Felheart Slippers") or (i=="Staff of Dominance") or (i=="Sorcerous Dagger") or (i=="Azuresong Mageblade") then
            return true
        else
            return false
        endif
    elseif(c=="Paladin")then
        if(i=="Lawbringer Boots") or (i=="Lawbringer Bracers") or (i=="Lawbringer Chestguard") or (i=="Lawbringer Gauntlets") or (i=="Lawbringer Helm") or (i=="Lawbringer Spaulders") or (i=="Aurastone Hammer") or (i=="Finkle's Lava Dredger") or (i=="Malistar's Defender") or (i=="Obsidian Edged Blade") then
            return true
        else
            return false
        endif
    elseif(c=="Shaman")then
        if(i=="Earthfury Boots") or (i=="Earthfury Bracers") or (i=="Earthfury Epaulets") or (i=="Earthfury Gauntlets") or (i=="Earthfury Helmet") or (i=="Earthfury Vestments") or (i=="Malistar's Defender") or (i=="Finkle's Lava Dredger") or (i=="Aurastone Hammer") then
            return true
        else
            return false
        endif
    endif
    return false
endfunction

function ClearRollers takes nothing returns nothing
    local integer i = 1
    loop
        exitwhen(i>11)
        set udg_nrollers_dismissed[i]=false
        if (IsValidClassForItem(GetItemName(udg_NROLL_Item), GetClass(udg_heroes[i])) == false) or (udg_heroes[i] == null) or (GetPlayerSlotState(Player(i-1)) != PLAYER_SLOT_STATE_PLAYING) then
            set udg_nrollers[i]=false
        else
            set udg_nrollers[i]=true
        endif
        set i=i+1
    endloop
    call TimerStart(udg_NROLL_Timer, 1, false, null)
endfunction

function LockItemActions takes nothing returns nothing
    if (GetTriggerUnit() == null) then
        call DestroyTrigger(GetTriggeringTrigger())
        return
    endif
    call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0, "|cffff0000That item is being rolled for.|r")
    call UnitDropItemPoint(GetTriggerUnit(), GetManipulatedItem(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
endfunction

function LockItem takes item i returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_PICKUP_ITEM)
    call TriggerRegisterTimerExpireEvent(t, udg_NROLL_Timer)
    call TriggerAddAction(t, function LockItemActions)
    set t = null
endfunction

function NeedRollActions takes nothing returns nothing
    local unit u = udg_heroes[GetPlayerId(GetTriggerPlayer())+1]
    local string class = GetClass(u)
    local integer i = 1
    local boolean bAllDismissed = true

    if (GetEventPlayerChatString() != "need") then
        set u = null
        call DestroyTrigger(GetTriggeringTrigger())
        return
    endif

    if(GetPlayerSlotState(GetTriggerPlayer()) == PLAYER_SLOT_STATE_PLAYING) and (IsValidClassForItem(GetItemName(udg_NROLL_Item), class) == true) and (u != null) then
        set udg_nrollers[GetPlayerId(GetTriggerPlayer())+1] = true
    else
        set udg_nrollers[GetPlayerId(GetTriggerPlayer())+1] = false
    endif
    set udg_nrollers_dismissed[GetPlayerId(GetTriggerPlayer())+1] = true

    loop
        exitwhen(i>11)
        if (udg_nrollers_dismissed[i] == false) then
            set bAllDismissed = false
            set i = 11
        endif
        set i=i+1
    endloop

    if (bAllDismissed == true) then
        call TimerStart(udg_NROLL_Timer, 1, false, null)
    endif

    set u = null
    call DestroyTrigger(GetTriggeringTrigger())
endfunction

function CommenceRollActions takes nothing returns nothing
    local integer i = 1
    local integer r = 0
    local integer m = 0
    local integer p = 0
    local integer scnd = 0
    local integer s = 0
    local boolean b = false
    local boolean c = false
    loop
        exitwhen(i>11)
        if (udg_nrollers[i]==true) then
            set r = GetRandomInt(1,100)
            set b = false
            set c = true
            call DisplayTextToForce(GetPlayersAll(), GetPlayerName(Player(i-1)) + " rolls " + I2S(r) + " on [" + GetItemName(udg_NROLL_Item) + "].")
            if (r >= m) then
                if (r == m) then
                    set scnd = GetRandomInt(1,10000)
                    set s = GetRandomInt(1,10000)
                    if (scnd > s) then
                        set b = true
                    endif
                endif
                if (b == false) then
                    set m = r
                    set p = i
                endif
            endif
        endif
        set i=i+1
    endloop
    if (c == false) then
        call DisplayTextToForce(GetPlayersAll(), "Everyone passed on [" + GetItemName(udg_NROLL_Item) + "].")
        call ExecuteFunc("Trig_Need_Roll_Passed_Actions")
    else
        call DisplayTextToForce(GetPlayersAll(), GetPlayerName(Player(p-1)) + " wins [" + GetItemName(udg_NROLL_Item) + "]!")
        call UnitAddItem(udg_heroes, udg_NROLL_Item)
    endif
    set udg_NROLL_Engaged = false 
    set udg_NROLL_Item = null
    call DestroyTrigger(GetTriggeringTrigger())
endfunction

Trigger:
JASS:
function Trig_Need_Roll_Func003Func001001 takes nothing returns boolean
    return ( udg_NROLL_Engaged == false )
endfunction

function Trig_Need_Roll_Func003C takes nothing returns boolean
    if ( not ( udg_NROLL_Engaged == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func001C takes nothing returns boolean
    if ( ( GetUnitTypeId(udg_TempUnit) == 'e000' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(udg_TempUnit) == 'e004' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(udg_TempUnit) == 'e001' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(udg_TempUnit) == 'e005' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(udg_TempUnit) == 'e003' ) ) then
        return true
    endif
    return false
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 18 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 16 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 14 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 12 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 10 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 8 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 6 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 4 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006Func003C takes nothing returns boolean
    if ( not ( udg_TempInt <= 2 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func006C takes nothing returns boolean
    if ( not Trig_Need_Roll_Func006Func001C() ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func007Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func007Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 67 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func007Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 34 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func007C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E006' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func008Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func008Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 67 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func008Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 33 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func008C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E009' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func009Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func009Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 67 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func009Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 34 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func009C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00A' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func010Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func010Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 50 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func010C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00B' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func011Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 55 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func011C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00E' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func012Func002Func001Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func012Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 75 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func012Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 50 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func012Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 25 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func012C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00D' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func013Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func013Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 67 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func013Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 33 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func013C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00F' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func014Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func014Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 67 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func014Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 34 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func014C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'E00H' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func015Func002Func001Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 100 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func015Func002Func001C takes nothing returns boolean
    if ( not ( udg_TempInt <= 80 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func015Func002C takes nothing returns boolean
    if ( not ( udg_TempInt <= 69 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func015C takes nothing returns boolean
    if ( not ( GetUnitTypeId(udg_TempUnit) == 'n00D' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Func016C takes nothing returns boolean
    if ( not ( GetLastCreatedItem() == null ) ) then
        return false
    endif
    return true
endfunction

function Trig_Need_Roll_Actions takes nothing returns nothing
    local trigger t = null
    local unit u = GetDyingUnit()
    if (GetUnitTypeId(u) == 'e00L') or (GetUnitTypeId(u) == 'e00I') or (GetUnitTypeId(u) == 'e00G') or (GetUnitTypeId(u) == 'e00K') or (GetUnitTypeId(u) == 'e008') or (GetUnitTypeId(u) == 'e002') or (GetUnitTypeId(u) == 'e00C') or (GetUnitTypeId(u) == 'e007') then
        set u = null
        return
    endif
    if ( Trig_Need_Roll_Func003C() ) then
        loop
            exitwhen ( Trig_Need_Roll_Func003Func001001() )
            call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 2.00))
        endloop
    else
    endif
    set udg_TempUnit = u
    set u = null
    set bj_lastCreatedItem = null
    if ( Trig_Need_Roll_Func006C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func006Func003C() ) then
            call CreateItemLoc( 'I01T', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func006Func003Func001C() ) then
                call CreateItemLoc( 'I00N', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func006Func003Func001Func001C() ) then
                    call CreateItemLoc( 'I01A', GetUnitLoc(udg_TempUnit) )
                else
                    if ( Trig_Need_Roll_Func006Func003Func001Func001Func001C() ) then
                        call CreateItemLoc( 'I015', GetUnitLoc(udg_TempUnit) )
                    else
                        if ( Trig_Need_Roll_Func006Func003Func001Func001Func001Func001C() ) then
                            call CreateItemLoc( 'I00Z', GetUnitLoc(udg_TempUnit) )
                        else
                            if ( Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001C() ) then
                                call CreateItemLoc( 'I01Y', GetUnitLoc(udg_TempUnit) )
                            else
                                if ( Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001C() ) then
                                    call CreateItemLoc( 'I01M', GetUnitLoc(udg_TempUnit) )
                                else
                                    if ( Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
                                        call CreateItemLoc( 'I00S', GetUnitLoc(udg_TempUnit) )
                                    else
                                        if ( Trig_Need_Roll_Func006Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
                                            call CreateItemLoc( 'I01H', GetUnitLoc(udg_TempUnit) )
                                        else
                                        endif
                                    endif
                                endif
                            endif
                        endif
                    endif
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func007C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func007Func002C() ) then
            call CreateItemLoc( 'I00M', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func007Func002Func001C() ) then
                call CreateItemLoc( 'I00T', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func007Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I014', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func008C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func008Func002C() ) then
            call CreateItemLoc( 'I00Y', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func008Func002Func001C() ) then
                call CreateItemLoc( 'I01G', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func008Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I01S', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func009C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func009Func002C() ) then
            call CreateItemLoc( 'I01I', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func009Func002Func001C() ) then
                call CreateItemLoc( 'I01U', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func009Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I010', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func010C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func010Func002C() ) then
            call CreateItemLoc( 'I01D', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func010Func002Func001C() ) then
                call CreateItemLoc( 'I018', GetUnitLoc(udg_TempUnit) )
            else
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func011C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func011Func002C() ) then
            call CreateItemLoc( 'I012', GetUnitLoc(udg_TempUnit) )
        else
        endif
    else
    endif
    if ( Trig_Need_Roll_Func012C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func012Func002C() ) then
            call CreateItemLoc( 'I024', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func012Func002Func001C() ) then
                call CreateItemLoc( 'I028', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func012Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I027', GetUnitLoc(udg_TempUnit) )
                else
                    if ( Trig_Need_Roll_Func012Func002Func001Func001Func001C() ) then
                        call CreateItemLoc( 'I021', GetUnitLoc(udg_TempUnit) )
                    else
                    endif
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func013C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func013Func002C() ) then
            call CreateItemLoc( 'I01Q', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func013Func002Func001C() ) then
                call CreateItemLoc( 'I01E', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func013Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I01L', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func014C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func014Func002C() ) then
            call CreateItemLoc( 'I01F', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func014Func002Func001C() ) then
                call CreateItemLoc( 'I01J', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func014Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I01P', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func015C() ) then
        set udg_TempInt = GetRandomInt(1, 100)
        if ( Trig_Need_Roll_Func015Func002C() ) then
            call CreateItemLoc( 'I023', GetUnitLoc(udg_TempUnit) )
        else
            if ( Trig_Need_Roll_Func015Func002Func001C() ) then
                call CreateItemLoc( 'I027', GetUnitLoc(udg_TempUnit) )
            else
                if ( Trig_Need_Roll_Func015Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I021', GetUnitLoc(udg_TempUnit) )
                else
                endif
            endif
        endif
    else
    endif
    if ( Trig_Need_Roll_Func016C() ) then
        return
    else
    endif
    call DisplayTextToForce( GetPlayersAll(), ( "Drop: " + ( GetItemName(GetLastCreatedItem()) + ". (Type need if you need, 30 second timeout.)" ) ) )
    set udg_NROLL_Engaged = true
    set udg_NROLL_Item = GetLastCreatedItem()
    call StartTimerBJ( udg_NROLL_Timer, false, 30.00 )
    call LockItem(GetLastCreatedItem())
    call ClearRollers()
    set t=CreateTrigger()
    set udg_TempInt=0
    loop
    exitwhen(udg_TempInt > 10)
    call TriggerRegisterPlayerChatEvent(t, Player(udg_TempInt), "need", true)
    call TriggerRegisterTimerExpireEvent(t, udg_NROLL_Timer)
    call TriggerAddAction(t, function NeedRollActions)
    set udg_TempInt=udg_TempInt+1
    endloop
    set t=CreateTrigger()
    call TriggerRegisterTimerExpireEvent(t, udg_NROLL_Timer)
    call TriggerAddAction(t, function CommenceRollActions)
    set t=null
endfunction

//===========================================================================
function InitTrig_Need_Roll takes nothing returns nothing
    set gg_trg_Need_Roll = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Need_Roll, Player(12), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Need_Roll, function Trig_Need_Roll_Actions )
endfunction
 
Level 7
Joined
Jul 20, 2008
Messages
377
1) Wall of Text
2) You just converted that from GUI and pasted it here, didn't you?
 
Level 4
Joined
Aug 3, 2008
Messages
80
i don't convertered the text from GUI to JASS....i only have copy the system from the map....but when i have copy the system it doesn't work but in the mape it works why?

I don't have learned JASS so i don't can change something or add.....

can somebody change it for me that it works?!

sry for the mistake at the title....
 
Level 5
Joined
Jan 15, 2007
Messages
199
It's unprotected so you can LEARN from it, not so you can COPY all the stuff and get OTHER PEOPLE to fix it for you, when the point is to LEARN
 
Level 4
Joined
Aug 3, 2008
Messages
80
It's unprotected so you can LEARN from it, not so you can COPY all the stuff and get OTHER PEOPLE to fix it for you, when the point is to LEARN

why learn?! why he doesn't protect the mape, when nobody should copy he's systems?!

and why learn?....the system works in his mape but not in an other...and i only wanted to now why?!....and maby if someone wanted (or can) make it...why he should doesn't help me?!

i think this is a trigger/jass/ai helping forum when something doesn't work or?
 
Level 5
Joined
Jan 15, 2007
Messages
199
and why learn?....the system works in his mape but not in an other...and i only wanted to now why?!....and maby if someone wanted (or can) make it...why he should doesn't help me?!
Because you're trying to use it, and you('re) fail(ing).
 
Level 14
Joined
Nov 18, 2007
Messages
816
The most probable issue with this is that you forgot to adjust the rawcodes for items. Oh, yeah, if youre already updating that system, go ahead and learn some vJass, so this becomes less of an abomination (using DestroyTrigger() and the like). Oh, and i suggest you really learn some english.

@HINDYhat: probably did the most work in GUI, then converted to Jass, and finally added some locals. Its still one of the worst script you will ever see.
 
Status
Not open for further replies.
Top