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.
- attacknum = 0
- textnum = 0
- music = "Bonetrousle3.0" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- encountertext = "Devil Sans Emerges!" --Modify as necessary. It will only be read out in the action select screen.
- wavetimer = 4
- arenasize = {155, 130}
- SetGlobal("hurtTime",-10)
- CanAttack = 1
- kill = 1
- SetGlobal('damage', 15)
- can = 1
- Skin = 0
- Lol =3
- SetPPCollision(true)
- NewAudio.CreateChannel("1")
- NewAudio.PlaySound( "1","Nyeh Heh Heh",true,0.65)
- enemies = {
- "AsrielFlowur"
- }
- enemypositions = {
- {0, 0}
- }
- Yar = 1
- Destroy = 0
- thetimer = 0
- AttackAnim = 0
- function Update()
- if AttackAnim == 1 then
- AnimateFloweyDown()
- else
- AnimateNone()
- end
- DEBUG(Destroy)
- if (GetGlobal("blackScreen") == true) then
- if Yar == 1 then
- screenbullet = CreateProjectileAbs("screenfade/white",320,240)
- screenbullet.SetVar('tile', 1)
- screenbullet.SetVar('Destruction', 0)
- screenbullet.sprite.alpha = 1
- if Destroy == 1 then
- screenbullet.SetVar("Destruction",1)
- Yar = 0
- screenbullet.Remove()
- end
- end
- end
- SetButtonLayer("Bottom")
- if Skin == 1 then
- enemies[1].Call("SetSprite","papy/Down")
- elseif Skin == 2 then
- enemies[1].Call("SetSprite","papy/Up")
- elseif Skin == 3 then
- enemies[1].Call("SetSprite","papy/Left")
- elseif Skin == 4 then
- enemies[1].Call("SetSprite","papy/Right")
- end
- end
- possible_attacks = {"Husky/blue_H","Husky/at2"}
- spawntimer7 = 0
- function EncounterStarting()
- require "Animations/Test"
- State("ENEMYDIALOGUE")
- Player.name = "Oliver"
- Player.lv = 20
- Player.hp = 99
- SetGlobal("hurtTime",false)
- Inventory.AddCustomItems({"Pure Hope"}, {0})
- Inventory.SetInventory({"Pure Hope"})
- end
- function Husky1()
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- enemies[1].SetVar('currentdialogue',("You Have Stood\n In My Way Long\n Enough!"))
- SetGlobal("intro",false)
- end
- textnum = textnum + 1
- attacknum = attacknum + 1
- if can == 1 then
- if textnum == 1 then
- enemies[1].SetVar('currentdialogue', {
- "[noskip][effect:twitch][effect:shake][func:BlackScreen][w:20][func:Begining][w:50][func:BeginingEnd][func:SetSprite,AFlower/Beg]See?\nI never betrayed\nyou![w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/Beg]It was all a\ntrick, see?[w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/Beg]I was waiting to\nkill him for you![w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/BestFr]After all it's me\nyour best friend![w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/Helpfull]I'm helpful, I can\nbe useful to you[w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/BestFr]I promise I won't\nget in your way[w:10][next]",
- "[noskip][effect:twitch][effect:shake][func:SetSprite,AFlower/Beg]I can help...\n[w:5]I can...\n[w:5]I can...[w:10][next]",
- "[noskip][func:SetSprite,AFlower/Scared][effect:twitch][effect:shake][w:10]Please [w:10]don't \n[w:10]kill[w:10] me.[w:10][next]","[func:SetSprite,AFlower/Scared][func:AttackAnims][effect:twitch][effect:shake][w:35]You Know[w:10] what[w:10][w:10][next]","[func:EndAttackAnims][func:SetSprite,AFlower/Angry]You are going\nto kill me.[w:10][next]","[noskip][func:SetSprite,AFlower/Angry][effect:twitch][effect:shake][w:2]And I don't know[w:10]\nif I can stop you.[w:10][next]","[noskip][func:SetSprite,AFlower/Angry][effect:twitch][effect:shake][w:2]But I have to\ntry any way[w:10][next]","[noskip][func:SetSprite,AFlower/Angry][effect:twitch][effect:shake]Souls.\nMaby you will\nnow work.[w:10][next]","[noskip][func:ChangeAnims][w:25],[func:EndChangeAnims][next]","[noskip][w:20][func:Monster][next]","[noskip]So[w:5][next]","[noskip][next]","[noskip]Can you beat me now[func:Begin][w:5][next]"
- })
- Audio.Pause()
- elseif textnum == 2 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Great]Nyeh Heh Heh\nSans taught me\nsome tricks",
- "[func:SetSprite,Papy/Happy]Can not wait\nTo try them"})
- elseif textnum == 3 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Happy]Heh\nI will become",
- "Soooo",
- "[func:SetSprite,Papy/Bring]Pop\nPop\nPop\nPOPULAR"})
- elseif textnum == 4 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Happy]Human\nbow down before\nthe ggggreat\nPapyrus",
- "[func:SetSprite,Papy/Great]Or not...",})
- elseif textnum == 5 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Happy]Do you want\n To hang out\n after I capture\nyou"})
- elseif textnum == 6 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Happy]Nyeh Heh Ow.\nI trust you\nwill come to\nyour sences",
- "[func:SetSprite,Papy/Great]I hope"})
- elseif textnum == 7 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Angry]Human\nI command\nyou to back\ndown"})
- elseif textnum == 8 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Great]Nyeh Heh Heh\nWell done\nHuman\nYou are doing \nwell"})
- elseif textnum == 9 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Papy/Cry]Human\nThis hurts\nstop"})
- elseif textnum == 10 then
- enemies[1].SetVar('currentdialogue',{" [func:SetSprite,Chara/Battle/CNeutral]Hah.\nVery determined.\nLets\'Justify\' That"})
- elseif textnum == 11 then
- enemies[1].SetVar('currentdialogue',{"Okay, \nHere we go\nThis will\nNeed alot of\nJustice"})
- elseif textnum == 12 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]You are\nstrong","I'll give\nyou that"})
- elseif textnum == 13 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]You're not\nBrave enough\nfor this\nthough","(Tip):Brave soul:\nUse space\nto change \nand match\nclours"})
- elseif textnum == 14 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]You really\nneed to\nslow down"})
- elseif textnum == 15 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CMad]That's it\nIf you do\nnot die\nI will use\nmy special attack"})
- elseif textnum == 16 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CJoy]Okay\nYou asked for it","I will\nhave to drop\nmy shield\nthough"})
- enemies[1].SetVar("Yes", 0)
- elseif textnum == 17 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]Wait\nWhy did\nYou not\nkill me"})
- elseif textnum == 18 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]Uh\nI'm killing\nYou so\nyou try to\nkill me right?"})
- elseif textnum == 19 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CNeutral]Are You\ntrying to\nmercy me?"})
- elseif textnum == 20 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CJoy]Oh wow.\nFine\nYou may spare\n me"})
- enemies[1].SetVar("name", "[starcolor:ffff00][color:ffff00]C H A R A")
- elseif textnum == 21 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Chara/Battle/CMad]Not"})
- end
- end
- end
- function EnemyDialogueEnding()
- if CanAttack == 1 then
- if attacknum == 1 then
- Audio.StopAll()
- Audio.Play()
- nextwaves = {"Pap/5"}
- Player.lv = 20
- Player.Heal(99)
- elseif attacknum == 2 then
- nextwaves = {"Pap/2"}
- Player.Heal(99)
- elseif attacknum == 3 then
- nextwaves = {"Pap/3"}
- Player.Heal(99)
- elseif attacknum == 4 then
- nextwaves = {"Pap/4"}
- Player.Heal(99)
- elseif attacknum == 5 then
- nextwaves = {"Pap/5"}
- Player.Heal(99)
- elseif attacknum == 6 then
- nextwaves = {"Pap/6"}
- Player.Heal(99)
- elseif attacknum == 7 then
- nextwaves = {"Pap/7"}
- Player.Heal(99)
- elseif attacknum == 8 then
- nextwaves = {"Pap/8"}
- Player.Heal(99)
- elseif attacknum == 9 then
- nextwaves = {"As/9"}
- Player.Heal(99)
- elseif attacknum == 10 then
- nextwaves = {"As/10"}
- Player.Heal(99)
- elseif attacknum == 11 then
- nextwaves = {"As/11"}
- Player.Heal(99)
- elseif attacknum == 12 then
- nextwaves = {"As/12"}
- Player.Heal(99)
- elseif attacknum == 13 then
- nextwaves = {"As/13"}
- Player.Heal(99)
- elseif attacknum == 14 then
- nextwaves = {"As/14"}
- Player.Heal(99)
- elseif attacknum == 15 then
- nextwaves = {"As/15"}
- Player.Heal(99)
- elseif attacknum == 16 then
- nextwaves = {"As/16"}
- Player.Heal(99)
- elseif attacknum == 17 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 18 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 19 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 20 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 21 then
- nextwaves = {"As/Ha"}
- attacknum = 0
- end
- end
- if CanAttack == 0 then
- nextwaves = {"Husky/Blank"}
- end
- end
- function DefenseEnding()
- encountertext = RandomEncounterText()
- end
- function HandleSpare()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- if ItemID == "PURE HOPE" then
- Player.Heal(50)
- BattleDialog({"Devil Sans's soul was consumed.[w:10]\nYou recovered 50 HP!"})
- end
- end
- function OnHit(bullet)
- if (bullet.GetVar('Destruction')) == 1 then
- whitebullet.Remove()
- elseif(bullet.GetVar('tile')) == 0 then
- Player.Hurt(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement