Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A basic encounter script skeleton you can copy and modify for your own creations.
- music = "loonboon.ogg" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- encountertext = "Dispar e Arthur estao prontos!" --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {""}
- wavetimer = 4.0
- arenasize = {155, 130}
- enemies = {
- "dispar",
- "arthur"
- }
- enemypositions = {
- {-180, 0},
- {120, 0}
- }
- function Battlemusic()
- Audio.PlaySound(loonboon)
- end
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
- possible_attacks = {"dispar_attack", "dispar_attack2", "arthur_attack","arthur_attack2","Basicattack","dispar_attack3"}
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- Player.lv = 1
- Player.Heal(99)
- Player.name = "YouTube"
- State("ENEMYDIALOGUE")
- end
- SetGlobal("intro", true)
- SetGlobal("isDead", false)
- SetGlobal("battle_progress", -1)
- function EnemyDialogueStarting()
- -- Good location for setting monster dialogue depending on how the battle is going.
- -- Example: enemies[1].SetVar('currentdialogue', {"Check it\nout!"}) See documentation for details.
- local intro = GetGlobal("intro") --updates the variable "intro" everytime the EnemyDialogueStarting() function is triggered
- local battle_progress = GetGlobal("battle_progress")
- if intro == true then
- Audio.Pause()
- enemies[1].SetVar('currentdialogue', {"[noskip][voice:dispar_voice]Prepare-\nse\npara\nencrenca!", "[noskip][func:SetSprite, dispar6][voice:dispar_voice]Para\nficar\ncom um\ncanal po-\npular!", "[func:SetSprite, dispar5][w:80][noskip][func:SetSprite, dispar_hurt][effect:none][waitall:6][voice:dispar_voice]UGH!!!\nARTHUR!!![w:60][func:Battlemusic][func:SetSprite, dispar_1][w:5][next]"})
- enemies[2].SetVar('currentdialogue', {"[w:10][noskip][voice:arthur_voice]Encre-\nnca\nem \ndobro", "[w:10][func:SetSprite, arthur_4][noskip][voice:arthur_voice]Para...\nuhh...[w:10][func:SetSprite, arthur_17]", "[noskip][func:SetSprite, arthur_18][effect:none][waitall:5][voice:arthur_voice]Eu\nesque-\nci a\nminha\nfrase[w:60][func:SetSprite, arthur_1][next]"})
- SetGlobal("intro", false) -- sets the variable "intro" to false so that this line of dialogue only plays once
- SetGlobal("battle_progress", 0)
- end
- local isDead = GetGlobal("isDead")
- if isDead == true then
- Audio.Pause()
- enemies[1].SetVar('currentdialogue', {"[noskip][func:SetSprite, dispar_dying1][voice:dispar_voice]...", "[noskip][func:SetSprite, dispar_dying2][voice:dispar_voice]...", "[w:10][noskip][func:SetSprite, dispar_dying4][voice:dispar_voice]ta tudo\nbem\nArthur...", "[noskip][func:SetSprite, dispar_dying4][voice:dispar_voice]Ja e\ntarde\ndemais...", "[noskip][func:SetSprite, dispar_dying3][voice:dispar_voice]Me\nprometa\nque...", "[noskip][func:SetSprite, dispar_dying3][voice:dispar_voice]Vai\nganhar\nessa\nluta\nmano![w:5]", "[noskip][func:Kill]"})
- enemies[2].SetVar('currentdialogue', {"[noskip][func:SetSprite, arthur_8][voice:arthur_voice]DISPAR!", "[noskip][func:SetSprite, arthur_8][voice:arthur_voice]NAO!\nNAO!\nNAO!", "[noskip][func:SetSprite, arthur_5][voice:arthur_voice]NAO\nMORRA!", "[noskip][func:SetSprite, arthur_hurt2][voice:arthur_voice]NAO\nME\nDIGA\nISSO!", "[noskip][func:SetSprite, arthur_5][voice:arthur_voice]NAO\nMORRA!", "[noskip][func:SetSprite, arthur_hurt2][voice:arthur_voice]PARE!", "[w:20][noskip][func:SetSprite, arthur_4][voice:arthur_voice]Dispar...[w:5]"})
- SetGlobal("isDead", false)
- end
- local battle_progress = GetGlobal("battle_progress")
- if battle_progress == 0 then
- enemies[1].SetVar('currentdialogue', {"[func:SetSprite, dispar6][voice:dispar_voice]Heheh!", "[func:SetSprite, dispar_2][voice:dispar_voice]Prepare-\n-se!", "[func:SetSprite, dispar_hurt][voice:dispar_voice]AFF!\nNAO\nIMPORTA!", "[func:SetSprite, dispar_hurt][voice:dispar_voice]PRESTA\nATENCAO\nNA\nBATA-\nLHA![w:40][next]"})
- enemies[2].SetVar('currentdialogue', {"[func:SetSprite, arthur_2][voice:arthur_voice]Nao\niremos\npegar\nleve!", "[w:10][func:SetSprite, arthur_18][voice:arthur_voice]Era\nessa a\nfrase\nne?", "[func:SetSprite, arthur_17][voice:arthur_voice]...", "[w:5][func:SetSprite, arthur_18][voice:arthur_voice]Ok\nmano[w:40][func:SetSprite, arthur_1][w:1][next]"})
- battle_progress = battle_progress + 1
- elseif battle_progress == 1 then
- enemies[1].SetVar('currentdialogue', {"[func:SetSprite, dispar_1][voice:dispar_voice]FAMA!\nINSCRITOS!\nPOPULA-\nIDADE!", "[voice:dispar_voice]Eu irei\nganhar!", "[func:SetSprite, dispar_hurt][voice:dispar_voice]PARA\nDE\nQUEBRAR\nMEUS S-\nONHOS![next]"})
- enemies[2].SetVar('currentdialogue', {"[func:SetSprite, arthur_2][voice:arthur_voice]", "[func:SetSprite, arthur_3][voice:arthur_voice]E isso\nai\nmano!", "[voice:arthur_voice]Se v-\noce nao\nfor at\nropelado\npelos SHORTS!", "[w:5][func:SetSprite, arthur_1][next]"})
- else
- end
- end
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- enemies[1].SetVar('currentdialogue', {"[func:SetSprite, dispar_1]"})
- enemies[2].SetVar('currentdialogue', {"[func:SetSprite, arthur_1]"})
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- end
- function DefenseEnding() --This built-in function fires after the defense round ends.
- Audio.Unpause()
- encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
- end
- function HandleSpare()
- State("ENEMYDIALOGUE")
- BattleDialog(("Voce tentou poupar ele\nMas ele recusou!"))
- enemies[1].SetVar("currentdialogue", ("[voice:dispar_voice]Onde\nvoce\npensa\nque esta\n indo?"))
- end
- function HandleItem(ItemID)
- BattleDialog({"Você comeu um " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement