Questions for moyack (?)

Coding Help

Well i've played your PoC map (which is great btw)

and i wanted to ask about 2 things, 1 being the naga water essence passive which grants regeneration near water (how did you make it ._.)

and the other being the credits in F9 having 2 scroll bars (how did you make it? XD)
Quote from: Darklycan51 on June 20, 2013, 03:15:38 PM
Well i've played your PoC map (which is great btw)

and i wanted to ask about 2 things, 1 being the naga water essence passive which grants regeneration near water (how did you make it ._.)
I use a timer that checks if all the units with the ability aren't in land using jass pathability functions every 0.4 seconds.

Quoteand the other being the credits in F9 having 2 scroll bars (how did you make it? XD)
I did a small system that use quests and subquests and this makes the effect of 2 scrollable sections.
Could you post the triggers? :/ i always need help with them T_T xd i would like to know because i'm doing an azzy wars (i'll upload it here once finished)

this is ironforge for example:
Spoiler
Bump? :/
Quote from: Darklycan51 on June 20, 2013, 04:36:31 PM
Could you post the triggers? :/ i always need help with them T_T xd i would like to know because i'm doing an azzy wars (i'll upload it here once finished)

this is ironforge for example:
Spoiler

Ok... triggers:

Wter essence:
Code (jass) Select
library NagaGenAbility initializer init requires TimedEffects

globals
    private constant integer  Upgrade = 'R000'       // upgrade rawcode
    private constant integer  WaterZoneBuff = 'B00Q' // Item buff
    private constant real     Regen = 4.             // Regeneration per second
    private constant real     FXDur = 1.             // Effect duration
    private          rect     R                      // Whole map rect
    private          integer  array SpellID          // Abilities realted to Naga Ability
    private          string   FX
endglobals

private function HasAbil takes unit u returns boolean
    return GetUnitAbilityLevel(u, SpellID[0]) > 0 or GetUnitAbilityLevel(u, SpellID[1]) > 0
endfunction

private function IsOrganic takes nothing returns boolean
    local unit u = GetFilterUnit()
    // Added the condition for water item....
    if GetPlayerTechCount(GetOwningPlayer(u), Upgrade, true) > 0 and GetWidgetLife(u) > 0.405 and GetWidgetLife(u) < GetUnitState(u, UNIT_STATE_MAX_LIFE) and HasAbil(u) and GetUnitAbilityLevel(u, WaterZoneBuff) > 0 or (not IsTerrainPathable(GetUnitX(u), GetUnitY(u), PATHING_TYPE_FLOATABILITY)) then
        call SetWidgetLife(u, GetWidgetLife(u) + Regen * TEIndexer.period)
        call TEonUnit.Start( u, FX, "origin", FXDur)
    endif
    set u = null
    return false
endfunction

private function Actions takes nothing returns boolean
    call GroupEnumUnitsInRect(bj_lastCreatedGroup, R, Condition(function IsOrganic))
    return false
endfunction

//===========================================================================
private function init takes nothing returns nothing
    set R = GetWorldBounds()
    set SpellID[0] = 'A016'
    set SpellID[1] = 'A01A'
    set FX = GetAbilityEffectById(SpellID[0], EFFECT_TYPE_SPECIAL, 0)
    call TEIndexer.AddCode( function Actions )
endfunction

endlibrary


Credits:
Code (jass) Select
scope Credits initializer Init

globals
    private quest array Q
endglobals

private function StartCredit takes integer questType, string title, string description, string iconPath returns quest
    local boolean required   = (questType == bj_QUESTTYPE_REQ_DISCOVERED) or (questType == bj_QUESTTYPE_REQ_UNDISCOVERED)
    local boolean discovered = (questType == bj_QUESTTYPE_REQ_DISCOVERED) or (questType == bj_QUESTTYPE_OPT_DISCOVERED)
    local quest q = CreateQuest()
    call QuestSetTitle(q, title)
    call QuestSetDescription(q, description)
    call QuestSetIconPath(q, iconPath)
    call QuestSetRequired(q, required)
    call QuestSetDiscovered(q, discovered)
    call QuestSetCompleted(q, false)
    return q
endfunction

private function StartSubCredit takes quest whichQuest, string description returns nothing
    local questitem q = QuestCreateItem(whichQuest)
    call QuestItemSetDescription(q, description)
    call QuestItemSetCompleted(q, false)
    set q = null
endfunction

private function Actions takes nothing returns nothing
    // Main credit
    set Q[0] = StartCredit( bj_QUESTTYPE_REQ_DISCOVERED, "Power of Corruption", "This is an altered melee map, where you can play a very improved Naga or Demon race.\n\nAny comments and suggestions can be placed in poc.it.cx. Thanks for playing.", "ReplaceableTextures\\CommandButtons\\BTNBrutalLord.blp" )
    call StartSubCredit( Q[0], "Visit [url=http://www.powerofcorruption.com]www.powerofcorruption.com[/url]" )
    call StartSubCredit( Q[0], "And download the latest version" )
    // Staff credit
    set Q[1] = StartCredit( bj_QUESTTYPE_REQ_DISCOVERED, "Team", "This is the staff behind of this game", "ReplaceableTextures\\CommandButtons\\BTNNagaKing.blp" )
    call StartSubCredit( Q[1], "Moyack: Main map developer." )
    call StartSubCredit( Q[1], "Av3n: Ideas, Spells, AI and suggestions" )
    call StartSubCredit( Q[1], "Tarrasque: Modelling & suggestions" )
    call StartSubCredit( Q[1], "JetFangInferno: Suggestions & FX design" )
    call StartSubCredit( Q[1], "Archmage Owenalacaster: AI development" )
    call StartSubCredit( Q[1], "THE_END: Comments, support and Skins" )
    // Models credit
    set Q[2] = StartCredit( bj_QUESTTYPE_REQ_DISCOVERED, "Models - Skins - Spells", "Armel:\n  - Naga Enchantress\nAv3n:\n  - Demon caster spells\nCookie:\n  - Arachnian Queen\nD.O.G:\n  - Demon Birth model\n  - Chaos Razormane\nDonDustin:\n  - VolcanoShieldTarget\nFrankster:\n  - Fel hound Rider\n  - Fel Orc Rampager\n  - Chaos Altar of Terror\n  - Fel Orc Assassin\n-Grendel:\n  - Ogre Iron Fist (modified)\n  - Legionnaire (modified)\nGottfrei:\n  - CruelCloister\n  - Demonic Sanctuary\nTarrasque:\n  - WarQueen\n  - incursor (terror king)\n  - Naga Royal Guard\n  - Dragon Turtle (Transport turtle)\n  - Death Knight (Burning Knight)\n  - Rock Prison\n  - Sea Drake\n  - Lord of Darkness", "ReplaceableTextures\\CommandButtons\\BTNLordofDarkness.blp")
    call StartSubCredit( Q[2], "Armel" )
    call StartSubCredit( Q[2], "Av3n" )
    call StartSubCredit( Q[2], "Cookie" )
    call StartSubCredit( Q[2], "D.O.G" )
    call StartSubCredit( Q[2], "DonDustin" )
    call StartSubCredit( Q[2], "Frankster" )
    call StartSubCredit( Q[2], "-Grendel")
    call StartSubCredit( Q[2], "Gottfrei" )
    call StartSubCredit( Q[2], "Tarrasque" )
    call StartSubCredit( Q[2], "JetFangInferno" )
    call StartSubCredit( Q[2], "Judash137" )
    call StartSubCredit( Q[2], "Mephestrial" )
    call StartSubCredit( Q[2], "Pheonix-IV" )
    call StartSubCredit( Q[2], "Sellenisko & 67Chrome" )
    call StartSubCredit( Q[2], "sPy")
    call StartSubCredit( Q[2], "THE_END" )
    call StartSubCredit( Q[2], "Whitehorn" )
    call StartSubCredit( Q[2], "WyrWuulfe" )
    // more art credits
    set Q[6] = StartCredit( bj_QUESTTYPE_REQ_DISCOVERED, "More art credits", "(Continuation):\nJetFagInferno\n  - Spiral Aura\n  - Fanactism Aura\n  - Greater Geiser\n  - Aura of Damnation\n  - Aura of Damnation buff\n  - BlackHole\n  - ManaThirst\n  - Treacherous Attack\n  - EnergyBreathDamage\n  - HolyAurora\nMephestrial:\n  - Legion Teleporter model\nJudash137\n  - Soul Aura\nPheonix-IV:\n  - Naga Town Hall\nSellenisko & 67Chrome:\n  - Alexstrazsa model\nSpy:\n  - Lava Bomb model\nTHE_END:\n  - Venom Warrior skin\n  - Demon Hall model\nWhitehorn:\n  - Diabolic skin\n  - Despoiler skin\nWyrWuulfe:\n  - Satyr Worker model", "ReplaceableTextures\\CommandButtons\\BTNNagaQueen.blp")
    call StartSubCredit( Q[6], "Armel" )
    call StartSubCredit( Q[6], "Av3n" )
    call StartSubCredit( Q[6], "Cookie" )
    call StartSubCredit( Q[6], "D.O.G" )
    call StartSubCredit( Q[2], "Frankster" )
    call StartSubCredit( Q[6], "-Grendel")
    call StartSubCredit( Q[6], "Gottfrei" )
    call StartSubCredit( Q[6], "Tarrasque" )
    call StartSubCredit( Q[6], "JetFangInferno" )
    call StartSubCredit( Q[6], "Mephestrial" )
    call StartSubCredit( Q[6], "Peekay" )
    call StartSubCredit( Q[6], "Pheonix-IV" )
    call StartSubCredit( Q[6], "Sellenisko & 67Chrome" )
    call StartSubCredit( Q[6], "sPy")
    call StartSubCredit( Q[6], "THE_END" )
    call StartSubCredit( Q[6], "Whitehorn" )
    call StartSubCredit( Q[6], "WyrWuulfe" )
    // Suggestions and Ideas credit
    set Q[3] = StartCredit( bj_QUESTTYPE_OPT_DISCOVERED, "Script & suggestions", "- Av3n (Your valuable help with items, abilities and other stuff)\n- RedDragon (Abilities help and other stuff)\n- Tarrasque (Your models and feedback were very useful)\n- JetFangInferno (For his suggestions and FX development)\n- GaDDeN (he has been a great helper with this project)\n- Kyrbi0: Abilities and some other ideas\n- Tim. (Thanks for his comments and for directing WC3C <3\n- Veev. For his help in grammar\n- Archmage Owenalacaster. For his help with the AI improvement.\n- Vexorian. For TimedLoop script\n- Earth-Fury for Board script.\n- WC3C community (for all the feedback received)", "ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp" )
    call StartSubCredit( Q[3], "Archmage Owenalacaster" )
    call StartSubCredit( Q[3], "Av3n" )
    call StartSubCredit( Q[3], "Earth-Fury" )
    call StartSubCredit( Q[3], "GaDDeN" )
    call StartSubCredit( Q[3], "Tarrasque" )
    call StartSubCredit( Q[3], "Jualin (Caster abilities ideas)" )
    call StartSubCredit( Q[3], "Kyrbi0" )
    call StartSubCredit( Q[3], "Tim." )
    call StartSubCredit( Q[3], "Raq_Thao" )
    call StartSubCredit( Q[3], "RedDragon" )
    call StartSubCredit( Q[3], "Sevion")
    call StartSubCredit( Q[3], "Whitehorn (Naga Imperial Warrior abilities)" )
    call StartSubCredit( Q[3], "Zantetsuken@Azeroth (Veev)" )

    set Q[4] = StartCredit( bj_QUESTTYPE_OPT_DISCOVERED, "Icons", "Some of this icons are as is, others were modified in borders and/or recolored in some cases, but they are based on the original work of the following authors:", "ReplaceableTextures\\CommandButtons\\BTNRune.blp" )
    call StartSubCredit( Q[4], "BLIZZARD" )
    call StartSubCredit( Q[4], "CrazzyRussian" )
    call StartSubCredit( Q[4], "FrIkY" )
    call StartSubCredit( Q[4], "Handclaw" )
    call StartSubCredit( Q[4], "M0rbid" )
    call StartSubCredit( Q[4], "neo1989" )
    call StartSubCredit( Q[4], "NFWar" )
    call StartSubCredit( Q[4], "TDR" )
    call StartSubCredit( Q[4], "TripleDotta" )
    // Other credits
    set Q[5] = StartCredit( bj_QUESTTYPE_OPT_DISCOVERED, "Other Credits", "- Vexorian: For your excellent WC3mapoptimizer. This map was reduced and protected with wc3optimizer 5.0\n- RedDragon: A great supporter, thanks a lot.\n- scumedit.net (R.I.P.): I have an special gratitude with this clan for its support and bugs comments.\n- PitzerMike: For keeping alive JNGP. This map has been developed in Jass New Generation Pack (5b).\n- WC3Campaigns.net: For all the great support and hosting of this project.\n- This map has been compiled using Jass Helper version 0.9.J.0. (required for 1.24 patch and the known shit...) Credits to the respective authors.", "ReplaceableTextures\\CommandButtons\\BTNInfernalFlameCannon.blp" )
    call StartSubCredit( Q[5], "Cohadar (For improving JassHelper and keep it alive)" )
    call StartSubCredit( Q[5], "Pipedream (Grimoire is too sexy)" )
    call StartSubCredit( Q[5], "PitzerMike (safety dance :P)" )
    call StartSubCredit( Q[5], "Zoxc" )
    call StartSubCredit( Q[5], "RedDragon: Ideas and suggestions" )
    call StartSubCredit( Q[5], "Red-Bones-Ghoul: Ideas and suggestions (Lord of Darkness abilities)" )
    call StartSubCredit( Q[5], "Blade.dk (his war stomp spell making tutorial opens my mind to the JASS world)" )
    call StartSubCredit( Q[5], "scumedit.net (R.I.P.)" )
    call StartSubCredit( Q[5], "www.wc3campaigns.net" )
    call StartSubCredit( Q[5], "Blizzard: For creating patch 1.24 and fuck the WC3 modding community" )
    call DestroyTimer(GetExpiredTimer())
    call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 5.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
endfunction

//===========================================================================
private function Init takes nothing returns nothing
    call TimerStart(CreateTimer(), 3., false, function Actions)
    call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 0., "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
    call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 8., "|cffffff00Power of Corruption v2.3 patch 1.24+ compatible version|r\n|CFF00FF00By MOYACK. 2012.|r\nFeaturing models from Tarrasque and JetFangInferno\nSpells by Av3n and Moyack,\nAI scripting improvements by Archmage Owenalacaster\n|cffffff00Press F9 for basic help and credits" )
endfunction

endscope

Thanks :p