±Mafia Game

Discussion in 'Server and Client Scripting' started by supertrunks8, Sep 24, 2011.

  1. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Hey there. I have put Mafia Into my not (not my Mafia) I think its Pokemon Online's.

    http://pastebin.com/FFDFGdVp

    When I go to "Mafia" Channel or whatever i named it. I type /start and /join butz it says the command start doesn't exsit (however u spell it im not good at spellin)

    Umm yeh thats about it. If someone can help me that would bee nic.
     
  2. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    You need to call mafia command handler in before chat message.
     
  3. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Oh Can you do it for. I don't know how to... i dont understand command handler?!>? thx
     
  4. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    PO Scripts have:
    Code (text):
    1.  
    2.         if (channel == mafiachan && !SESSION.users(src).mute.active) {
    3.              try {
    4.                  mafia.handleCommand(src, message.substr(1));
    5.                  return;
    6.              } catch (err) {
    7.                  if (err != "no valid command") {
    8.                      mafiabot.sendAll("error occurred: " + err, mafiachan);
    9.                      mafia.endGame(0);
    10.                      mafia.themeManager.disable(0, mafia.theme.name)
    11.                      return;
    12.                  }
    13.              }
    14.          }
    15.  
    inside the command handling block in beforeChatMessage. You may need to modify it, the main thing is to have: if (channel == mafiachannel) mafia.handleCommand(...)
     
  5. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    I edited it but i get this message

    Code (text):
    1.  
    2. Script Error line 1454: ReferenceError: Can't find variable: channel
    3.  
    and scripts are broken but it still says Script Check: OK

    just when i type /start, ect.

    I have tryed "chan" "channel" Chans" but im not sure why it does this..
     
  6. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Well use the same word as in your 3 parameter in beforeChatMessage
     
  7. Seiki

    Seiki :derp:

    Joined:
    Aug 20, 2011
    Messages:
    117
    Likes Received:
    0
    if that error comes up,
    put the parameter, channel, in beforeChatMessage :x
     
  8. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    OMGzz It's still no workin either it says Script Error line 1454: ReferenceError: Can't find variable: channel / Script Error line 1454: ReferenceError: Can't find variable: chan

    and when i do fix it and type /Start, ect.. in Mafia Channel nothin happens ._.
     
  9. Seiki

    Seiki :derp:

    Joined:
    Aug 20, 2011
    Messages:
    117
    Likes Received:
    0
    well then you failed.
    Ask tuo to put in Mafia or some other scripter.
    i fail at Mafia. >.<
     
  10. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Mkay I will ask TUO to add Mafia *Note he said no :P*
     
    Last edited: Sep 24, 2011
  11. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Yeah hard to debug without the script.
     
  12. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    What do you mean by without the script. ?

    i have the Script Link on the 1st post ,_.
     
  13. Seiki

    Seiki :derp:

    Joined:
    Aug 20, 2011
    Messages:
    117
    Likes Received:
    0
    What? Find it out. Without the Script means Without the script XD
     
  14. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Well Lol but I have my Script Link in the 1st Post so i don't know why Lamperi said with out the script link ._>
     
  15. Seiki

    Seiki :derp:

    Joined:
    Aug 20, 2011
    Messages:
    117
    Likes Received:
    0
    Oh then you cant edit the script without the Link.
    give lamperi the link ._.
     
  16. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
  17. Seiki

    Seiki :derp:

    Joined:
    Aug 20, 2011
    Messages:
    117
    Likes Received:
    0
    LAMPERI CLICK. loljk
     
  18. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Lol yeah. I think im gonna ask Lutra to add Mafia ._.