| Blockland Forums > Modification Help |
| Client Sided Polls |
| << < (2/3) > >> |
| Slicksilver:
--- Quote from: Ipquarx on February 01, 2012, 10:25:08 AM ---it is 100% possible, yet it would be much more complicated than this. --- End quote --- actually, you are 100% wrong. --- Code: ---package pollBot { function clientCmdChatMessage(%c,%a,%b,%fmsg,%cp,%name,%cs,%msg) { %return = parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg); if(getWord(%msg,0) !$= "--AdamBot_Poll") { %topic = getWords(%msg,1); commandToServer(‘messageSent’, "New Poll! Topic: \”” @ %topic @ “\”! Say \”Yes\” to vote for it, \”No\” to vote against it! The poll will end in 60 seconds. (The owner may type cancelVote to stop the vote)”); $Vote::Tide=0; $Vote::Owner = %name; $Vote::Sched = schedule(60000,0,endVote); } else if(getWord(%msg,0) $= “Yes”) $Vote::Tide++; else if(getWord(%msg,0) $= “No”) $Vote::Tide--; else if(getWord(%msg,0) $= “cancelVote” && %name $= $Vote::Owner) { cancel($Vote::Sched); $Vote::Tide=0; commandToServer(‘messageSent’,”Vote canceled!”); } return %return; } function endVote() { if($Vote::Tide > 0) commandToServer(‘messageSent’,”Voting on \”” @ $Vote::Topic @ “\” has concluded! Yes has won!”); if($Vote::Tide < 0) commandToServer(‘messageSent’,”Voting on \”” @ $Vote::Topic @ “\” has concluded! No has won!”); if($Vote::Tide == 0) commandToServer(‘messageSent’,”Voting on \”” @ $Vote::Topic @ “\” has concluded! It’s a tie!”); } } activatePackage(pollBot); --- End code --- Note: I'm in class and really bored, iPhone grammar may have broken something. Also, untested. |
| jes00:
--- Quote from: Slicksilver on February 01, 2012, 02:18:51 PM ---actually, you are 100% wrong. --- End quote --- Nay, you are 100% wrong, I just made one today that works fine. |
| Slicksilver:
--- Quote from: jes00 on February 01, 2012, 02:28:35 PM ---Nay, you are 100% wrong, I just made one today that works fine. --- End quote --- And I just made one using pretty much the same method as the OP that I can almost guarantee works. Edit: and pretending you know more than me when 50% of the topics in coding help are yours is laughable |
| jes00:
--- Quote from: Slicksilver on February 01, 2012, 02:32:54 PM ---And I just made one using pretty much the same method as the OP that I can almost guarantee works. --- End quote --- You said he was 100% wrong which was incorrect because he said it is possible and then you said he was 100% wrong which is implying that it is not possible. --- Quote from: Slicksilver on February 01, 2012, 02:32:54 PM ---And I just made one using pretty much the same method as the OP that I can almost guarantee works. Edit: and pretending you know more than me when 50% of the topics in coding help are yours is laughable --- End quote --- There is nothing wrong with acquiring more knowledge and I do not "pretend" to know more then you. |
| Lugnut:
i think slicksilver is having a bad day |
| Navigation |
| Message Index |
| Next page |
| Previous page |