RyokuHasu
-
Posts
1938 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Calendar
Posts posted by RyokuHasu
-
-
did you add all the correct .visual = true/ false ?
i recommend looking back over those and aking shure you have them all. if you have them ALL, then we can move on with further debuging if it still dosn't work. -
there are 3 condtional statments
if… then - simple true false checker, only runs once, just remember >, <, = , <>, or, and
do... while- an uncommonly used loop, used for looping as long at one thing is the same
for- a more common loop, loops though a set array and stops when it reached the end, used for checking large abounts of ordered data, and writing large amounts data
*correct me if im wrong, but this is the basic ideas for the statments in most programing mediums -
I say you need VB6 just so it works better
EDIT: DONT EVEN HINT ILLEGAL ACTIVITY
Request: Please remove that quote -
thank you ^_^
-
thank you =D
I was looking for a way to make yours useful and pratical for game creation ^_^ i think this covers that, thank you so much for creating the base i used! -
=P well, arnt you going to have diffrent wands for dirrenent levels?
then use his and sel the CLASS REQUIREMENTS to the wands to what ever your casing class is and set class requirements for every thing =P -
EDITED: Added Above
Added, a pet checker for the new mode
Gives your summoning item back if you cant summon or already have a summon out.
REDO
@RyokuHasu:
> In modGameLogic
>
> Find the Sub SpawnPet and replace with:
>
> ```
>
> Sub SpawnPet(ByVal index As Long, ByVal MapNum As Long, npcnum As Long)
>
> Dim PlayerMap As Long
> Dim i As Integer
> Dim PetSlot As Byte
>
> 'Prevent multiple pets for the same owner
> If TempPlayer(index).TempPetSlot > 0 Then
> Call GiveInvItem(index, npcNum, 0)
> Exit Sub
> End If
> PlayerMap = GetPlayerMap(index)
> PetSlot = 0
> For i = 1 To MAX_MAP_NPCS
> If Map(PlayerMap).Npc(i) = 0 Then
> PetSlot = i
> Exit For
> End If
> Next
>
> If PetSlot = 0 Then
> Call GiveInvItem(index, npcNum, 0)
> Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red)
> Exit Sub
> End If
>
> 'create the pet for the map
> Map(PlayerMap).Npc(PetSlot) = npcnum
> MapNpc(PlayerMap).Npc(PetSlot).Num = npcnum
>
> 'set its Pet Data
> MapNpc(PlayerMap).Npc(PetSlot).IsPet = YES
> MapNpc(PlayerMap).Npc(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & Npc(npcnum).Name
> MapNpc(PlayerMap).Npc(PetSlot).PetData.Owner = index
>
> 'If Pet doesn't exist with player, link it to the player
> If Player(index).Pet.SpriteNum <> npcnum Then
> Player(index).Pet.SpriteNum = npcnum
> Player(index).Pet.Name = GetPlayerName(index) & "'s " & Npc(npcnum).Name
> End If
> TempPlayer(index).TempPetSlot = PetSlot
> 'cache the map for sending
> Call MapCache_Create(PlayerMap)
> 'save the map
> SaveMap (PlayerMap)
>
> 'send the update
> For i = 1 To Player_HighIndex
> If IsPlaying(i) Then
> If GetPlayerMap(i) = GetPlayerMap(index) Then
> SendMap i, PlayerMap
> End If
> End If
> Next
>
> Select Case GetPlayerDir(index)
> Case DIR_UP
> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
> Case DIR_DOWN
> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1)
> Case DIR_LEFT
> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index))
> Case DIR_RIGHT
> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
> End Select
>
> 're-warp the players on the map
> For i = 1 To Player_HighIndex
> If IsPlaying(i) Then
> If GetPlayerMap(i) = GetPlayerMap(index) Then
> Call PlayerWarp(index, PlayerMap, GetPlayerX(index), GetPlayerY(index))
> End If
> End If
> Next
> End Sub
>
> ``` -
Edit: Helladen dose have the better version, just deal with it.
-
=D let me know how it turns out, then please share with me ^_^
-
17\. Because It's SUPER Easy to learn how to make your own modifications!
-
OR!
Use the scripted Tiles system to script tiles that give items, then time out for a while. (found in source tutorials)
But this isjust a theory… id have to look into it,... -
Thank you
-
I did, i just mod mine alot XD , i always make spares though =3
-
=D I want my new one at least on the list =3 who dosnt want even MORE advanced pet options =D
PLEEEEEASE =D -
try reapplying him to the map, i had the same problem, ALSO, try adding more stats, for some reason that helps somties too =D
-
Hello, this is my first major tutorial, i decided to make one because i want to get noticed, that and a Tamer class sucks with only one summon, lol. And yes, I am leaving out a few other features i added to my version, got to keep some stuff for my self.
Discription:
Use a summoning item to summon the matching NPC: monsters, quest givers, mercenaries, ANYTHING.
they are also treated as consumables, they disapear after use. (this is now optional to remove)
you CAN take pets from map to map with you. (edited back in)
**Prerequired Tutorial**http://www.touchofdeathforums.com/smf/index.php/topic,69521.0.html
* Credit to Lightning for the base I used
**Translated In German by EisKeks, Under "Abschnitt 2"**
http://www.touchofdeathforums.com/smf/index.php/topic,71065.new.html
* GERMAN VERSION IS NOT COMPATIBLE WITH THE NEW PET SYSTEM VERSION
* * *
MY TUTORIAL
**BOTH SERVER AND CLIENT**
In modConstants
Find: ' Item constants
Add Public Const ITEM_TYPE_SUMMON As Byte = # (the next number on the list)
example
```
' Item constants
Public Const ITEM_TYPE_NONE As Byte = 0
Public Const ITEM_TYPE_WEAPON As Byte = 1
Public Const ITEM_TYPE_ARMOR As Byte = 2
Public Const ITEM_TYPE_HELMET As Byte = 3
Public Const ITEM_TYPE_SHIELD As Byte = 4
Public Const ITEM_TYPE_CONSUME As Byte = 5
Public Const ITEM_TYPE_KEY As Byte = 6
Public Const ITEM_TYPE_CURRENCY As Byte = 7
Public Const ITEM_TYPE_SPELL As Byte = 8
Public Const ITEM_TYPE_SUMMON As Byte = 9
```
This declairs the new item type
* * *
**SERVER SIDE**
Befor we start we need to delete a some thing that will conflict with my new way of doing things
Because these wont fit the new spawn pet parameters sadly they must go, if it calls spawn pet, we have to kill it
in modHandleData and look for "Public Sub InitMessages()".
Delete:
```
HandleDataSub(CSpawnPet) = GetAddress(AddressOf HandleSpawnPet)
```
and in the same mod find Public Sub HandleSpawnPet
and delete
```
Public Sub HandleSpawnPet(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
SpawnPet Index, GetPlayerMap(Index)
End Sub
```
In modPlayer Find: 'switch maps
Find:
```
SpawnPet index, MapNum
```Replace with:
```
SpawnPet index, MapNum, Trim$(Player(index).Pet.SpriteNum)
```
WOOT!!! I got the pet to follow you to diffrent maps!
In modGameLogic
Find the Sub SpawnPet and replace with:
```
Sub SpawnPet(ByVal index As Long, ByVal mapNum As Long, npcNum As Long)
Dim PlayerMap As Long
Dim i As Integer
Dim PetSlot As Byte
'Prevent multiple pets for the same owner
If TempPlayer(index).TempPetSlot > 0 Then Exit Sub
PlayerMap = GetPlayerMap(index)
PetSlot = 0
For i = 1 To MAX_MAP_NPCS
'If Map(PlayerMap).Npc(i) = 0 Then
If MapNpc(PlayerMap).NPC(i).SpawnWait = 0 And MapNpc(PlayerMap).NPC(i).Num = 0 Then
PetSlot = i
Exit For
End If
Next
If PetSlot = 0 Then
Call GiveInvItem(index, npcNum, 0)
Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red)
Exit Sub
End If
'create the pet for the map
Map(PlayerMap).NPC(PetSlot) = npcNum
MapNpc(PlayerMap).NPC(PetSlot).Num = npcNum
'set its Pet Data
MapNpc(PlayerMap).NPC(PetSlot).IsPet = YES
MapNpc(PlayerMap).NPC(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & NPC(npcNum).Name
MapNpc(PlayerMap).NPC(PetSlot).PetData.Owner = index
'If Pet doesn't exist with player, link it to the player
If Player(index).Pet.SpriteNum <> npcNum Then
Player(index).Pet.SpriteNum = npcNum
Player(index).Pet.Name = GetPlayerName(index) & "'s " & NPC(npcNum).Name
End If
TempPlayer(index).TempPetSlot = PetSlot
'cache the map for sending
Call MapCache_Create(PlayerMap)
'Cache the Pets for players logging on [Add new Number to array]
PetMapCache(PlayerMap).UpperBound = PetMapCache(PlayerMap).UpperBound + 1
PetMapCache(PlayerMap).Pet(PetMapCache(PlayerMap).UpperBound) = PetSlot
If PetMapCache(Player(index).Map).UpperBound > 0 Then
For i = 1 To PetMapCache(Player(index).Map).UpperBound
Call NPCCache_Create(index, Player(index).Map, PetMapCache(Player(index).Map).Pet(i))
Next
End If
Select Case GetPlayerDir(index)
Case DIR_UP
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
Case DIR_DOWN
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1)
Case DIR_LEFT
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index))
Case DIR_RIGHT
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
End Select
're-warp the players on the map
For i = 1 To Player_HighIndex
If IsPlaying(i) Then
If GetPlayerMap(i) = GetPlayerMap(index) Then
Call PlayerWarp(i, PlayerMap, GetPlayerX(i), GetPlayerY(i))
End If
End If
Next
End Sub
```
this declares npcNUM as a new parameter and let us summon diffrent pets, how ever the "Call Pet button will no longer work now, DONT NEED IT, we will use items.
In modPlayer find Public Sub UseItem (should be the last one)
In the bottum of the sub, befor End Select, add
```
Case ITEM_TYPE_SUMMON
' stat requirements
For i = 1 To Stats.Stat_Count - 1
If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then
PlayerMsg index, "You do not meet the stat requirements to use this item.", BrightRed
Exit Sub
End If
Next
' level requirement
If GetPlayerLevel(index) < Item(itemnum).LevelReq Then
PlayerMsg index, "You do not meet the level requirement to use this item.", BrightRed
Exit Sub
End If
' class requirement
If Item(itemnum).ClassReq > 0 Then
If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then
PlayerMsg index, "You do not meet the class requirement to use this item.", BrightRed
Exit Sub
End If
End If
' access requirement
If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then
PlayerMsg index, "You do not meet the access requirement to use this item.", BrightRed
Exit Sub
End If
Call SpawnPet(index, GetPlayerMap(index), itemnum)
Call TakeInvItem(index, itemnum, 0)
```
this adds the ability to summon using items Item number = Summoned NPC number SIMPLE AND UNLIMITED!!! (close to it)
* * *
**CLIENT SIDE**
NO SCRIPTING!? O.o
BUT! we have to do the Visual things
Open the frmEditor_Item
click on cmbType only once
![](http://www.touchofdeathforums.com/smf/index.php?action=dlattach;topic=69925.0;attach=17268)
over on the properties find the list
![](http://www.touchofdeathforums.com/smf/index.php?action=dlattach;topic=69925.0;attach=17360)
Add Summon at the bottom
![](http://www.touchofdeathforums.com/smf/index.php?action=dlattach;topic=69925.0;attach=17272)
This enables the new type of item to be created, want the edit parameters? they ARE the NPC editor
Next
Open up frmMain
Find your pet menu find your "call pet" button, double click it
![](http://www.touchofdeathforums.com/smf/index.php?action=dlattach;topic=69925.0;attach=17274)
ERASE
```
Private Sub Label3_Click()
Call SpawnPet(MyIndex)
End Sub
```
This prevents an error for what we are about to do…
NOW DELETE YOUR CALL PET BUTTON!!!! you use items for that now, no cheating, go BUY a summon.
AND TADA!!!! =D
you now have Pet summoning with items!!!! Complete with ability to set requirements for the summons
How to use:
Make a summon item, set your requirements, and SAVE! Now remember what number that item is.
Next, make a NPC *ON THE SAME NUMBER* as the summon item
Now summon, and the rest of the controls are the same.
you now have an advanced summoning system, and ability to make an entire Tamer Class.
[hr/]
**Optional**
To make the item stay after summoning, for those who want to do so.
In game logic change sub SpawnPet to (YES, you do this AGAIN, someone didnt and it messed up)
```
Sub SpawnPet(ByVal index As Long, ByVal mapNum As Long, npcNum As Long)
Dim PlayerMap As Long
Dim i As Integer
Dim PetSlot As Byte
'Prevent multiple pets for the same owner
If TempPlayer(index).TempPetSlot > 0 Then Exit Sub
PlayerMap = GetPlayerMap(index)
PetSlot = 0
For i = 1 To MAX_MAP_NPCS
'If Map(PlayerMap).Npc(i) = 0 Then
If MapNpc(PlayerMap).NPC(i).SpawnWait = 0 And MapNpc(PlayerMap).NPC(i).Num = 0 Then
PetSlot = i
Exit For
End If
Next
If PetSlot = 0 Then
Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red)
Exit Sub
End If
'create the pet for the map
Map(PlayerMap).NPC(PetSlot) = npcNum
MapNpc(PlayerMap).NPC(PetSlot).Num = npcNum
'set its Pet Data
MapNpc(PlayerMap).NPC(PetSlot).IsPet = YES
MapNpc(PlayerMap).NPC(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & NPC(npcNum).Name
MapNpc(PlayerMap).NPC(PetSlot).PetData.Owner = index
'If Pet doesn't exist with player, link it to the player
If Player(index).Pet.SpriteNum <> npcNum Then
Player(index).Pet.SpriteNum = npcNum
Player(index).Pet.Name = GetPlayerName(index) & "'s " & NPC(npcNum).Name
End If
TempPlayer(index).TempPetSlot = PetSlot
'cache the map for sending
Call MapCache_Create(PlayerMap)
'Cache the Pets for players logging on [Add new Number to array]
PetMapCache(PlayerMap).UpperBound = PetMapCache(PlayerMap).UpperBound + 1
PetMapCache(PlayerMap).Pet(PetMapCache(PlayerMap).UpperBound) = PetSlot
If PetMapCache(Player(index).Map).UpperBound > 0 Then
For i = 1 To PetMapCache(Player(index).Map).UpperBound
Call NPCCache_Create(index, Player(index).Map, PetMapCache(Player(index).Map).Pet(i))
Next
End If
Select Case GetPlayerDir(index)
Case DIR_UP
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
Case DIR_DOWN
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1)
Case DIR_LEFT
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index))
Case DIR_RIGHT
Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)
End Select
're-warp the players on the map
For i = 1 To Player_HighIndex
If IsPlaying(i) Then
If GetPlayerMap(i) = GetPlayerMap(index) Then
Call PlayerWarp(i, PlayerMap, GetPlayerX(i), GetPlayerY(i))
End If
End If
Next
End Sub
```
and in modPlayer
find Case ITEM_TYPE_SUMMON and erase
```
Call TakeInvItem(index, itemnum, 0)
```at the bottom -
(1)
Brightes day? It be dark as my crack. -
You know you a geek when you can learn any programing medium in a single day
(i know about 8) -
Banned because Code Geass rules
-
*Ryoku Summons his pet dragon from his game and sets Mr. Sean on fire.*
My hill =D -
O.o your welcome…. Wiat, I helped? It worked? =o I never contribute to any project in a helpful way... I LOVE THIS PLACE!!! =D
-
Its just a guess, did you change the amount of buttons in mod constants?
In Mod Constants (client side) under 'animated buttons
Change
```
Public Const MAX_MAINBUTTONS As Long = 6
```to
```
Public Const MAX_MAINBUTTONS As Long = 7
```
if this dosnt help a bit, shoot me XD
though im not shure how this will look in the layout =P -
Nice, this is perfect, casters normally use staffs or and like weapons so you just need to make caster only weapons in the editor =D
GOOD JOB!!!
*high five* -
There are a few of these out already and i thought I would share my Slightly more complex Spell scaling with everyone. It combines a few existing tutorials and adds in a but more math .
SERVER ONLY
In modCombat
Find: "Sub CastSpell" scroll down a bit an find " ' set the vital"
you should see
```
Vital = Spell(spellnum).Vital
```Or your previous mod…
Replace it with
```
Vital = Spell(spellnum).Vital
Vital = Round((Vital * 0.7)) * Round((Player(index).Level * 1.14) )* Round((Stats.Intelligence + (Stats.Willpower / 2)))
If Spell(spellnum).Type = SPELL_TYPE_HEALHP Then
Vital = Vital + Round((GetPlayerStat(index, Stats.Willpower) * 0.6))
End If
If Spell(spellnum).Type = SPELL_TYPE_DAMAGEHP Then
Vital = Vital + Round((GetPlayerStat(index, Stats.Intelligence) * 0.6))
End If
```
***KEEP THE ORIGINAL VITAL LOW WHEN MAKING SPELLS!!!***
The point of scaling them is so that you dont have to raise the vitals in the editer any more that 100 at the very most
You may fiddle witht the numbers to adjust it as you see fit.
Hope this make Your casting classes more fun :P
*It is not recomended that you edit this extensively with out understanding of basic algebra and stat functions
Compile error with EO… O.o
in Source
Posted