Mirage Source
Item Type Issue - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Item Type Issue (/showthread.php?tid=2274)



Re: Item Type Issue - Mattyw - 19-10-2008

Respawn the map.


Re: Item Type Issue - Nean - 19-10-2008

Yeah, I noticed this for MS4 as well. After rebooting the server, the item will appear, but that's really inconvenient. :|


Re: Item Type Issue - Jacob - 19-10-2008

Place the item. Send the map. Type /respawn.


Re: Item Type Issue - DarkX - 19-10-2008

Try adding the respawn call to the packet that sends or saves the edit. Or add to the Send code on the btnOK on mapeditor
Code:
packet = &SEP_CHAR & RESPAWN & SEP_CHAR & END_CHAR
see if something like that works.


Re: Item Type Issue - Rian - 19-10-2008

packet = &SEP_CHAR & RESPAWN & SEP_CHAR & END_CHAR
Call SendData(Packet)


Re: Item Type Issue - DarkX - 19-10-2008

Sonire which do you think he should have that added to, the button or the packet?


Re: Item Type Issue - Rian - 19-10-2008

The button. For it to work properly, those two lines should be the last two lines in the button's code.


Re: Item Type Issue - DarkX - 20-10-2008

By the way, just so you are aware it does not work unless you add another if statement, and Shadow the reload system does work, just do it and should do it if not pardon my wording but you fucked something up.


Re: Item Type Issue - deathknight - 20-10-2008

He could also just be using the default blank sprite, which would cause him to not be able to see it after he respawns the map. I had the same problem, more so because I'm to lazy to change my item sprites.


Re: Item Type Issue - DarkX - 21-10-2008

Wouldn't surprise me if that is his problem, he is slightly slow when it comes to that, try some pot might help.


Re: Item Type Issue - DarkX - 21-10-2008

I tried it out on ms4 and ms3.0.3 he's just being a idiot, so do not worry about it DFA


Re: Item Type Issue - GIAKEN - 21-10-2008

No it is an error. I have to type /respawn for it to update the items, which shouldn't have to be done.


Re: Item Type Issue - Nean - 21-10-2008

It's an easy fix. One that is easy, but perhaps not the best way of doing it, is to make it respawn, when you click send, from mapeditor

Code:
Private Sub cmdSend_Click()
    Call MapEditorSend
    Call SendMapRespawn
End Sub

Is what I put. Works fine.


Re: Item Type Issue - GIAKEN - 21-10-2008

Yeah but that's not how it should be done Big Grin I'll take a look at it.


Re: Item Type Issue - DarkX - 21-10-2008

I your that worried about it why not add something that calls the respawn the button or add it to the updatemap packet type that call the reload of the map.


Re: Item Type Issue - Rian - 21-10-2008

Because that's not the root of a problem, but merely a temporary solution.


Re: Item Type Issue - GIAKEN - 21-10-2008

I fixed it for MS 3.59.


Re: Item Type Issue - DarkX - 21-10-2008

If it's fixed in 3.59 why not just post the fix?


Re: Item Type Issue - GIAKEN - 21-10-2008

[code]Function CanAttackPlayer(ByVal Attacker As Long, ByVal Victim As Long) As Boolean

CanAttackPlayer = False

' Check attack timer
If GetTickCount < TempPlayer(Attacker).AttackTimer + 1000 Then Exit Function

' Check for subscript out of range
If Not IsPlaying(Victim) Then Exit Function

' Make sure they are on the same map
If Not GetPlayerMap(Attacker) = GetPlayerMap(Victim) Then Exit Function

' Make sure we dont attack the player if they are switching maps
If TempPlayer(Victim).GettingMap = YES Then Exit Function

' Check if at same coordinates
Select Case GetPlayerDir(Attacker)
Case DIR_UP
If Not ((GetPlayerY(Victim) + 1 = GetPlayerY(Attacker)) And (GetPlayerX(Victim) = GetPlayerX(Attacker))) Then Exit Function
Case DIR_DOWN
If Not ((GetPlayerY(Victim) - 1 = GetPlayerY(Attacker)) And (GetPlayerX(Victim) = GetPlayerX(Attacker))) Then Exit Function
Case DIR_LEFT
If Not ((GetPlayerY(Victim) = GetPlayerY(Attacker)) And (GetPlayerX(Victim) + 1 = GetPlayerX(Attacker))) Then Exit Function
Case DIR_RIGHT
If Not ((GetPlayerY(Victim) = GetPlayerY(Attacker)) And (GetPlayerX(Victim) - 1 = GetPlayerX(Attacker))) Then Exit Function
Case Else
Exit Function
End Select

' Check if map is attackable
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Then
If GetPlayerPK(Victim) = NO Then
Call PlayerMsg(Attacker, "This is a safe zone!", BrightRed)
Exit Function
End If
End If

' Make sure they have more then 0 hp
If GetPlayerVital(Victim, Vitals.HP)