dao Posted June 4, 2009 Author Share Posted June 4, 2009 First id like to say i couldnt of done this without unknown. thanks xDif i missed something post it.Go to map editor go on attributes and find chest one and open the properties window and make it visible.then paste this code inside of it> frmChest.Show vbModalAll client sidedCtrl find this in mod game editor:> If frmMapEditor.optChest.Value = True ThenThen make sure it looks like this:> If frmMapEditor.optChest.Value = True Then> .Type = TILE_TYPE_CHEST> .Data1 = ChestItemNum> .Data2 = ChestItemAmount> .Data3 = 0> .String1 = vbNullString> .String2 = vbNullString> .String3 = vbNullString> End IfCtrl find this in mod game editor:> If frmMapEditor.optChest.Value = True ThenThen make sure it looks like this:> If frmMapEditor.optChest.Value = True Then> .Type = TILE_TYPE_CHEST> .Data1 = ChestItemNum> .Data2 = ChestItemAmount> .Data3 = 0> .String1 = vbNullString> .String2 = vbNullString> .String3 = vbNullString> End IfCtrl find this:> ' Handle when the player presses the return keyAt the bottom add this:> If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).Type = TILE_TYPE_CHEST And Player(MyIndex).Dir = DIR_UP Then> Call SendData("openchest" & SEP_CHAR & END_CHAR)> Exit Sub> End If> End IfNow Ctrl find this:> If Map(GetPlayerMap(MyIndex)).Tile(X, Y).Type = TILE_TYPE_BLOCKEDAnd highlight the whole code and replace with:> If Map(GetPlayerMap(MyIndex)).Tile(X, Y).Type = TILE_TYPE_BLOCKED Or Map(GetPlayerMap(MyIndex)).Tile(X, Y).Type = TILE_TYPE_SIGN Or Map(GetPlayerMap(MyIndex)).Tile(X, Y).Type = TILE_TYPE_ROOFBLOCK Or Map(GetPlayerMap(MyIndex)).Tile(X, Y).Type = TILE_TYPE_CHEST Then> CanMove = False> Exit Function> End IfNow in mod types add:> ' Used for chest editor> Public ChestItemNum As Long> Public ChestItemAmount As LongNow download this and put it in your source and drag it in your frm's[http://www.freemmorpgmaker.com/files/imagehost/pics/caa5d63d7ae2cfc30034c7716cc4843c.zip](http://www.freemmorpgmaker.com/files/imagehost/pics/caa5d63d7ae2cfc30034c7716cc4843c.zip) Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2009 Share Posted June 4, 2009 Nice Zultar,you finding a fix for everything lol good job Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 4, 2009 Share Posted June 4, 2009 Dont work for me, when i click the chest atribute dont happens anything :S Link to comment Share on other sites More sharing options...
dao Posted June 4, 2009 Author Share Posted June 4, 2009 OOPS add this in the code for the chest attribute> frmChest.Show vbModal Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 4, 2009 Share Posted June 4, 2009 Well, now when i press enter in chest atributte, the game lost the conection :S Link to comment Share on other sites More sharing options...
dao Posted June 4, 2009 Author Share Posted June 4, 2009 Ctrl find this in mod game editor:> If frmMapEditor.optChest.Value = True ThenThen make sure it looks like this:> If frmMapEditor.optChest.Value = True Then> .Type = TILE_TYPE_CHEST> .Data1 = ChestItemNum> .Data2 = ChestItemAmount> .Data3 = 0> .String1 = vbNullString> .String2 = vbNullString> .String3 = vbNullString> End If Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 5, 2009 Share Posted June 5, 2009 OMG still dont working :(, i press enter in front of C atribute and conection lost of game :S Link to comment Share on other sites More sharing options...
dao Posted June 5, 2009 Author Share Posted June 5, 2009 in mod game logic search for this> ' Say message> If Len(Trim$(MyText)) > 0 Then> Call SayMsg(MyText)> End If> MyText = vbNullString> Exit Sub> End Ifif its not there add it then test Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 5, 2009 Share Posted June 5, 2009 Yes, i have this code added, and dont work. you are sure dont need add code to server side? Link to comment Share on other sites More sharing options...
dao Posted June 5, 2009 Author Share Posted June 5, 2009 >.< try adding this to the botton of handle data in the server```Case "openchest" If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Type = TILE_TYPE_CHEST Then If Val(ReadINI(GetPlayerName(Index), "Chest" & GetPlayerMap(Index) & "," & GetPlayerX(Index) & "," & (GetPlayerY(Index) - 1), App.Path & "\Chests.ini", 0)) = 0 Then Call PlayerMsg(Index, "The chest contained " & Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data2 & " " & Trim$(Item(Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data1).Name), 1) Call GiveItem(Index, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data1, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data2) Call WriteINI(GetPlayerName(Index), "Chest" & GetPlayerMap(Index) & "," & GetPlayerX(Index) & "," & (GetPlayerY(Index) - 1), 1, App.Path & "\Chests.ini") Else Call PlayerMsg(Index, "You already opened this chest", BLUE) End If Else Call HackingAttempt(Index, "Trying to chest cheat!!") End If Exit Sub End Select Call HackingAttempt(Index, "Received invalid packet: " & Parse(0))``` Link to comment Share on other sites More sharing options...
kris_hole Posted June 13, 2009 Share Posted June 13, 2009 or instead of saying at the bottom coz people WILL put it in the wrong place as the bottom is where it handles all the packets not where it gets them.Find```Case "getclasses" Call Packet_GetClasses(Index) Exit Sub```and underneath it put…```Case "openchest" If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Type = TILE_TYPE_CHEST Then If Val(ReadINI(GetPlayerName(Index), "Chest" & GetPlayerMap(Index) & "," & GetPlayerX(Index) & "," & (GetPlayerY(Index) - 1), App.Path & "\Chests.ini", 0)) = 0 Then Call PlayerMsg(Index, "The chest contained " & Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data2 & " " & Trim$(Item(Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data1).Name), 1) Call GiveItem(Index, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data1, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index) - 1).Data2) Call WriteINI(GetPlayerName(Index), "Chest" & GetPlayerMap(Index) & "," & GetPlayerX(Index) & "," & (GetPlayerY(Index) - 1), 1, App.Path & "\Chests.ini") Else Call PlayerMsg(Index, "You already opened this chest", BLUE) End If Else Call HackingAttempt(Index, "Trying to chest cheat!!") End If Exit Sub``` Link to comment Share on other sites More sharing options...
dao Posted June 13, 2009 Author Share Posted June 13, 2009 kool nice lol i dont even think people care for this that much Link to comment Share on other sites More sharing options...
Jed Posted June 15, 2009 Share Posted June 15, 2009 not working, every time i try to compile it gives me "End If without block If" and highlights the end if of this:' Say message If Len(Trim$(MyText)) > 0 Then Call SayMsg(MyText) End If MyText = vbNullString Exit Sub End If Link to comment Share on other sites More sharing options...
Braiton Posted June 15, 2009 Share Posted June 15, 2009 Umm.well, you can see the problem with the ifs. Maybe, try this?:' Say message If Len(Trim$(MyText)) > 0 Then Call SayMsg(MyText) MyText = vbNullString Exit Sub End IfYou can see its simple, just remove an end if. Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 15, 2009 Share Posted June 15, 2009 Its simple remove a End If Link to comment Share on other sites More sharing options...
dao Posted June 15, 2009 Author Share Posted June 15, 2009 yeah not sure why its hard. ill give out a compiled version maybe later Link to comment Share on other sites More sharing options...
Skillzalot Posted June 15, 2009 Share Posted June 15, 2009 Good jobs guys. I like how you can only use it once Link to comment Share on other sites More sharing options...
dao Posted June 16, 2009 Author Share Posted June 16, 2009 llol u got it working? xD Link to comment Share on other sites More sharing options...
kris_hole Posted June 16, 2009 Share Posted June 16, 2009 well i havnt done this yet i just use scripted tiles and ini's before i could be arsed to do the chest attribute but meh. i'll compile it into a fresh source for ya'll… give me 5 mins or so :P Link to comment Share on other sites More sharing options...
dao Posted June 16, 2009 Author Share Posted June 16, 2009 alright kool good to know lol xD Link to comment Share on other sites More sharing options...
kris_hole Posted June 16, 2009 Share Posted June 16, 2009 i'll shove it in the "your edit bit" =Dand i know whats causing an error in this btw for people now when they try to chat and they get a full string when they press any letter.if you didnt put this RIGHT AT THE BOTTOM of the sub that handles when the enter key is pressed then remove one of the end if's… so it goes...```If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).Type = TILE_TYPE_CHEST And Player(MyIndex).Dir = DIR_UP Then Call SendData("openchest" & SEP_CHAR & END_CHAR) Exit Sub End If End If```to```If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).Type = TILE_TYPE_CHEST And Player(MyIndex).Dir = DIR_UP Then Call SendData("openchest" & SEP_CHAR & END_CHAR) Exit Sub End If``` Link to comment Share on other sites More sharing options...
Jed Posted June 16, 2009 Share Posted June 16, 2009 i got rid of the middle end if in that, now its taking everything i type and using it without me pressing enter first. Link to comment Share on other sites More sharing options...
kris_hole Posted June 17, 2009 Share Posted June 17, 2009 i did say if you DIDNT post it at the bottom of the sub… not if you did Link to comment Share on other sites More sharing options...
Darkonever Posted June 30, 2009 Share Posted June 30, 2009 Ok, I have 1 question. Did this work already or is it still dead?And If first Yes then is it work for EE 2.8? Link to comment Share on other sites More sharing options...
dao Posted June 30, 2009 Author Share Posted June 30, 2009 I think it works and ya it will 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