Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Polkm's Good and Evil System


NostalgiaX
 Share

Recommended Posts

I added Polkm's Good and Evil System to my Main.txt, but it's not working properly.

I think I've narrowed the problem down a bit to these lines.
```
'Good Bad npc
Dim NPCSIDE
Dim GoodPoints
Dim BadPoints
NPCSIDE=GetVar("NPCData.ini",GetNpcName(NPC_Num),"G\B")
GoodPoints=GetVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints")
BadPoints=GetVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints")

If NPCSIDE = G Then
    Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints",""&GoodPoints - 1)
    'Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints",""&BadPoints + 1)
End If
If NPCSIDE = B Then
    Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","GoodPoints",""&GoodPoints + 1)
    'Call PutVar("accounts\"&GetPlayerLogin(index)&"\"&GetPlayerName(index)&".ini","Good/Bad","BadPoints",""&BadPoints - 1) 
End If
```I edited the code a bit.

Here's what the NPCData.ini looks like.
```
[Koopa]
G\B=B
[Goomba]
G\B=B
[Toad]
G\B=G
[Bob-Omb]
G\B=B
```
Whenever you kill ANY enemy (even if the enemy isn't on the NPCData.ini list), you gain a GoodPoint. How can I fix this?
I am using EE2.7
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...