Trocar Sprite por item
5 participantes
Página 1 de 1
Trocar Sprite por item
Bom, Procurei aqui no forum e nao encontrei entao vou postar ....
Na frmEditor_Item crie uma label e um scrollBox com as seguintes configurações:
Na frmEditor_Item crie uma label e um scrollBox com as seguintes configurações:
Label
ScrollBox
Dentro do ScrllBox adicione:
Procure por:
Serve~side
No final da Private Type ItemRec, antes do End Type, adicione:
- Spoiler:
- Name: lblSprite
Caption: Sprite: Não mudar
ScrollBox
- Spoiler:
- Name: scrlSprite
Dentro do ScrllBox adicione:
- Código:
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
lblSprite.Caption = "Sprite: " & scrlLevelReq
Item(EditorIndex).Sprite = scrlSprite.Value
' Error handler
Exit Sub
errorhandler:
HandleError "scrlSprite_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
- Spoiler:
- Trocar Sprite
Procure por:
- Código:
Public Const ITEM_TYPE_SPELL As Byte = 13
- Código:
Public Const ITEM_TYPE_SPRITE As Byte = 14
- Código:
frmEditor_Item.scrlRarity.Value = .Rarity
- Código:
frmEditor_Item.scrlSprite.Value = .Sprite
- Código:
Sprite As Long
Serve~side
No final da Private Type ItemRec, antes do End Type, adicione:
- Código:
Sprite As Long
- Código:
Public Const ITEM_TYPE_SPELL As Byte = 13
- Código:
Public Const ITEM_TYPE_SPRITE As Byte = 14
- Código:
Case ITEM_TYPE_SPELL
' stat requirements
For i = 1 To Stats.Stat_Count - 1
If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then
PlayerMsg index, "Você não tem os status requeridos para equipar esse equipamento.", BrightRed
Exit Sub
End If
Next
' level requirement
If GetPlayerLevel(index) < Item(itemnum).LevelReq Then
PlayerMsg index, "Você não tem o level requerido para usar esse item.", BrightRed
Exit Sub
End If
' class requirement
If Item(itemnum).ClassReq > 0 Then
If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then
PlayerMsg index, "Você não tem a classe necessaria para usar esse item.", BrightRed
Exit Sub
End If
End If
' access requirement
If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then
PlayerMsg index, "Você não tem o acesso requerido para usar esse item.", BrightRed
Exit Sub
End If
' Get the spell num
n = Item(itemnum).Data1
If n > 0 Then
' Make sure they are the right class
If Spell(n).ClassReq = GetPlayerClass(index) Or Spell(n).ClassReq = 0 Then
' Make sure they are the right level
i = Spell(n).LevelReq
If i <= GetPlayerLevel(index) Then
i = FindOpenSpellSlot(index)
' Make sure they have an open spell slot
If i > 0 Then
' Make sure they dont already have the spell
If Not HasSpell(index, n) Then
Call SetPlayerSpell(index, i, n)
Call
SendAnimation(GetPlayerMap(index), Item(itemnum).Animation, 0, 0,
TARGET_TYPE_PLAYER, index)
Call TakeInvItem(index, itemnum, 0)
Call PlayerMsg(index, "Agora você
pode usar a magia " & Trim$(Spell(n).Name) & ".", BrightGreen)
Else
Call PlayerMsg(index, "Você ja tem essa magia.", BrightRed)
End If
Else
Call PlayerMsg(index, "Você não pode aprender mais magias.", BrightRed)
End If
Else
Call PlayerMsg(index, "Você precisa estar no
nivel " & i & " para aprender essa magia.", BrightRed)
End If
Else
Call PlayerMsg(index, "Essa magia so pode ser
aprendida pela classe " &
CheckGrammar(GetClassName(Spell(n).ClassReq)) & ".", BrightRed)
End If
End If
' send the sound
SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum
- Código:
Case ITEM_TYPE_SPRITE
' stat requirements
For i = 1 To Stats.Stat_Count - 1
If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then
PlayerMsg index, "Você não tem os status requeridos para equipar esse equipamento.", BrightRed
Exit Sub
End If
Next
' level requirement
If GetPlayerLevel(index) < Item(itemnum).LevelReq Then
PlayerMsg index, "Você não tem o level requerido para usar esse item.", BrightRed
Exit Sub
End If
' class requirement
If Item(itemnum).ClassReq > 0 Then
If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then
PlayerMsg index, "Você não tem a classe necessaria para usar esse item.", BrightRed
Exit Sub
End If
End If
' access requirement
If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then
PlayerMsg index, "Você não tem o acesso requerido para usar esse item.", BrightRed
Exit Sub
End If
' Trocar sprite
Call SetPlayerSprite(index, Item(itemnum).Sprite)
' send the sound
SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum
' atualizar player
Call SendPlayerData(index)
KURIZZARD²- Membro
- Mensagens : 238
Re: Trocar Sprite por item
Pelo oque eu sei ja tem esse tutorial e foi postado pelo lucas100vs,os códigos são identicos
Monotoshi- Membro Vitalicio
- Mensagens : 591
Re: Trocar Sprite por item
Man nao achei scroll box pra cria vei ,esse é msm o nome ? achei um monte de ...box menos scrollbox . ta no menu ? ta onde vei ?
tgsamu- Novato
- Mensagens : 8
Re: Trocar Sprite por item
ata ,vlw e onde coloca akeles ultimos codes la ? que vc deixo ? serve~side é pra ir no editor do serve ,certo ?
tgsamu- Novato
- Mensagens : 8
Tópicos semelhantes
» Trocar de Sprite por Item
» Sistema de trocar de sprite
» Item Sprite v1.0
» Item q muda sprite
» Como tranformar a sprite com item
» Sistema de trocar de sprite
» Item Sprite v1.0
» Item q muda sprite
» Como tranformar a sprite com item
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
Dom 08 Abr 2018, 18:40 por JorgeZinhoo002
» Ojkjeeeee
Seg 10 Out 2016, 23:19 por Frozen
» Naruto Great Ninja Batle
Dom 09 Out 2016, 14:29 por GuiinhoLP
» Recrutamento de um Designer para jogo de CDZ.
Sex 23 Set 2016, 18:37 por newbie123
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:11 por Eduardo
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:11 por Eduardo
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:09 por Eduardo
» Projeto Dbz
Qua 31 Ago 2016, 23:46 por 157
» Avaliação - Sprites Naruto
Qua 31 Ago 2016, 17:09 por 157
» [Sprites] DBZ (Plix)
Qua 31 Ago 2016, 14:13 por 157
» Super Pack - Bleach V.2
Qua 31 Ago 2016, 13:02 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:04 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:03 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:02 por 157
» [Pedido] Contador de resets na FrmMain
Sáb 13 Ago 2016, 17:45 por killers97
» [Recrutamento]
Qua 10 Ago 2016, 23:09 por Monsters
» Ajuda erro no Cliente e Servidor do EEB 2.6!
Qua 20 Jul 2016, 19:53 por Binholx
» Como criar tilesets para Eclipse Origins 3.0 (POKÉMON)
Qua 29 Jun 2016, 19:46 por Sir Aaron
» Recursos Pokemons
Qua 29 Jun 2016, 19:34 por Sir Aaron
» erro frm flash
Qua 25 maio 2016, 13:51 por vava123
» Pedido - Pack de star wars
Qui 19 maio 2016, 05:06 por edsonpet
» [Ajuda] Sobre como por o servidor on por ip fixo
Ter 17 maio 2016, 16:14 por vava123
» Illusion Dimension - O Misterio do ID: BETA TESTE ONLINE
Sex 06 maio 2016, 20:02 por LksFlorencio
» [NSME] Naruto Shinobi Maker Engine
Qua 23 Mar 2016, 15:11 por luana1457
» Script /base,/casa Igual DBZ Forces
Dom 21 Fev 2016, 07:34 por JorgeZinhoo002
» [Pedido]Colar Tsunade item sprite eclipse origin
Qui 21 Jan 2016, 07:38 por lawllietbr
» [Pedido] Elysium
Sáb 19 Dez 2015, 11:31 por luana1457
» Naruto - Recruta
Ter 15 Dez 2015, 18:40 por Uchiha ~
» [Avaliação] - Kirito from Sword Art Online; Red and Pikachu from Pokemon.
Qua 25 Nov 2015, 13:43 por Thanakii
» [Avaliação] - Kenpachi Zaraki from Bleach; Libra Shiryu From Saint Seiya.
Qua 25 Nov 2015, 12:55 por Thanakii
» Demonstração de Sprites (Á VENDA!)
Qua 25 Nov 2015, 12:40 por Thanakii
» [Sistema de Reset]Para Eclipse .
Ter 24 Nov 2015, 16:51 por VithorUchi
» Cada Guild Nascer em Certo Mapa
Qui 12 Nov 2015, 06:13 por fabiofeijó_HIT
» Dragon Ball z Fusion A Grande Volta
Qui 29 Out 2015, 15:17 por fabiofeijó_HIT
» Ajuda com Ip fixo
Seg 26 Out 2015, 16:07 por GalaxyHells15
» Como Fazer um GUI no Eclipse Origins
Dom 18 Out 2015, 22:10 por Jeanleee
» Shisui Susanoo
Dom 18 Out 2015, 20:23 por Jeanleee
» Fantasy Art Online
Dom 18 Out 2015, 16:41 por daviih123
» Ajuda !!
Seg 05 Out 2015, 12:13 por andersonzika
» como passar o usuário e senha para o MainMenu?
Seg 28 Set 2015, 22:03 por Bëzerk
» Ru time ero 13 Type mismatch
Seg 28 Set 2015, 09:08 por andredarle
» Jarvis 1.3 Download
Qua 23 Set 2015, 18:42 por soares125
» [Avaliação/Disponibilização]Árvore 64x64
Qua 23 Set 2015, 15:15 por Over~
» Mlk's Zikas Signatures
Ter 22 Set 2015, 21:15 por Aikawa Reborn'
» Pedido de Sistemas
Dom 20 Set 2015, 18:05 por cleyton_05
» [AjudaEEB]Gerador de EXP
Qua 16 Set 2015, 14:04 por Over~
» [Avaliar] Base, Humano e Goblin.
Seg 14 Set 2015, 22:51 por .iBlaz3.
» Fabrica do Tio Cronos!
Dom 13 Set 2015, 21:31 por [ADM]Cronos
» [PixelArt] Minion - Meu malvado favorito
Dom 13 Set 2015, 12:51 por [ADM]Cronos
» [Avaliar] Goku Dragon Ball Z
Qua 05 Ago 2015, 21:36 por Setrux