unnown Posted September 30, 2008 Author Share Posted September 30, 2008 alright this is an tutorial how to make more item types as asked ,server and client side:in modconstants find> ' Item Constants.you'll see a list of item types, add the new type you'd like to make(i used teleport)> Public Const ITEM_TYPE_TELEPORT = 19*look good at what number should be used nextclient side:open up the item editor form and open the cmpType propertiesnow click on list and add the new name of the type (in my case Teleport)in modgameeditor find Public Sub ItemEditorOk()and above> Call SendSaveItem(EditorIndex)add``` If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_TELEPORT) Then Item(EditorIndex).Data1 = 0 Item(EditorIndex).Data2 = 0 Item(EditorIndex).Data3 = 0 Item(EditorIndex).StrReq = 0 Item(EditorIndex).DefReq = 0 Item(EditorIndex).SpeedReq = 0 Item(EditorIndex).MagicReq = 0 Item(EditorIndex).ClassReq = -1 Item(EditorIndex).AccessReq = 0 Item(EditorIndex).AddHP = 0 Item(EditorIndex).AddMP = 0 Item(EditorIndex).AddSP = 0 Item(EditorIndex).AddSTR = 0 Item(EditorIndex).AddDEF = 0 Item(EditorIndex).AddMAGI = 0 Item(EditorIndex).AddSpeed = 0 Item(EditorIndex).AddEXP = 0 Item(EditorIndex).AttackSpeed = 0 Item(EditorIndex).Stackable = 0 End If```(note this is still using my item type) :Pserver sidein modhandledata find> Public Sub Packet_UseItem(ByVal Index As Long, ByVal InvNum As Long)if you look at it you find a> Select Case Item(GetPlayerInvItemNum(Index, InvNum)).Typein that case add:(note this is done with my example)``` Case ITEM_TYPE_TELEPORT If Player(Index).TargetType = TARGET_TYPE_PLAYER And Player(Index).Target > 0 Then Call PlayerWarp(Player(Index).Target, 1, 1, 1) Else Call PlayerWarp(Index, 1, 1, 1) End If Call TakeItem(Index, Player(Index).Char(CharNum).Inv(InvNum).num, 1)``` Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted September 30, 2008 Share Posted September 30, 2008 Holy wow, unnown! This is easier than I thought. I'll just edit the details that I need. I'm creating separate weapon types (bow, axe, sword), and I will be making a separate damage formula for each. so I'll just figure out how to make a weapon from reading the source a bit more. Any suggestions before I start? (I got classes today) Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted September 30, 2008 Share Posted September 30, 2008 I had an idea during calculus:Can I make an if statement in the Gamelogic's Sub GetPlayerDamage that goes something like this:Function GetPlayerDamage(ByVal Index As Long) As Long Dim WeaponSlot As Long, RingSlot As Long, NecklaceSlot As Long GetPlayerDamage = 0' Check for subscript out of range If IsPlaying(Index) = False Or Index <= 0 Or Index > MAX_PLAYERS Then Exit Function End IfIf ITEM_TYPE_SWORD Then GetPlayerDamage = Rand(Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 3) * 0.25, Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 2) * 2.5)If ITEM_TYPE_AXE Then GetPlayerDamage = Rand(Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 3) * 0.25, Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 2) * 2.5)If ITEM_TYPE_BOW Then GetPlayerDamage = Rand(Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 3) * 0.25, Int(GetPlayerSTR(Index) / 4) + Int(GetPlayerDEF(Index) / 2) * 2.5)Else GetPlayerDamage = Rand(Int(GetPlayerStr(index) /4) * 0.50, etc?I know the formulas were the same, but can the concept still work? Link to comment Share on other sites More sharing options...
unnown Posted September 30, 2008 Author Share Posted September 30, 2008 hmm you still need to read what weapon the player is holding Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted September 30, 2008 Share Posted September 30, 2008 Do tell how to . Do I need like CheckPlyaerWeaponSlot(index, itemnum)? Link to comment Share on other sites More sharing options...
unnown Posted September 30, 2008 Author Share Posted September 30, 2008 ' Check to see if its any sort of ArmorSlot/WeaponSlot Select Case Item(GetPlayerInvItemNum(Index, GetPlayerWeaponSlot(Index))).Type Case ITEM_TYPE_WEAPON Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted September 30, 2008 Share Posted September 30, 2008 unnown should be knighted, made god, and given the earth as a gift. Link to comment Share on other sites More sharing options...
unnown Posted September 30, 2008 Author Share Posted September 30, 2008 lol kis-ass :P Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted September 30, 2008 Share Posted September 30, 2008 Guilty as charged! :embarrassed:But seriously. This is stuff I've wanted to do for an eternetyBTW: It's kiss-ass. If you're going to insult me, do it properly. =p Link to comment Share on other sites More sharing options...
unnown Posted October 1, 2008 Author Share Posted October 1, 2008 hey i'm dutch, you can kiss my weed smoking ass :P Link to comment Share on other sites More sharing options...
JadeCurt1ss Posted October 1, 2008 Share Posted October 1, 2008 I'll drink to that :occasion14:Ok, drinking's over. I get an RTE 380 every time I try and re-edit the new item type I created (I made a separate Weapon type for Bows.)Any thoughts on what causes this? If anything, can I send you my source and you can take a look at it? Link to comment Share on other sites More sharing options...
unnown Posted October 1, 2008 Author Share Posted October 1, 2008 hmm…sure upload it and pm me :) Link to comment Share on other sites More sharing options...
tiggilyboo Posted December 2, 2008 Share Posted December 2, 2008 And if you were to add a boots or other pd slots it wouldnt show within the equiping menu and wouldnt display PD… This would have to be a huge Tut to do those though... I just recommend searching a already made item type and adding the new item type under it, with slightly altered code... Link to comment Share on other sites More sharing options...
unnown Posted December 3, 2008 Author Share Posted December 3, 2008 well actually it would be pretty easy to doadd a new slot (copy paste the leg slot)now copy paste the leg slot code and alter itsame thing goes with every paperdoll codeif you want i'll write a tut :) Link to comment Share on other sites More sharing options...
tiggilyboo Posted December 9, 2008 Share Posted December 9, 2008 Nah thats fine. It was more for other people, rather than myself. I've added some item types already. Thanks anyways. Link to comment Share on other sites More sharing options...
Devogen Posted December 9, 2008 Share Posted December 9, 2008 Nice tut, thnx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now