Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tickle

Pages: [1] 2 3 4 5 6 ... 10
1
Modification Help / Re: Tried to fix this stuff, didn't work.
« on: December 17, 2009, 10:24:31 AM »
I've tried alot, and ended trimming the code incredibly. It does execute the commands, but in a wrong way, and doesn't echo stuff if it isn't one of the commands.

Code:
Code: [Select]
$ac::silent = 0;
package advcam
{
function AdvancedCamera_CAM()
{
if(!$ac::silent) { commandToServer('messagesent',"No CAM argument supplied."); }
}
function AdvancedCamera_CMODE_Normal()
{
warn("AdvancedCamera: MODE NORMAL");
localClientConnection.chasecam(0);
}
function AdvancedCamera_CMODE_CHASE(%realchat)
{
%num = getSubStr(%realchat,16,strlen(%realchat));
if(%num <="0") { if(!$ac::silent) { commandToServer('messagesent',"CMODE CHASE Argument out of bounds!"); } }
if(%num >="999") { if(!$ac::silent) { commandToServer('messagesent',"CMODE CHASE Argument out of bounds!"); } }
localClientConnection.chasecam(%num);
if(!$ac::silent) { commandToServer('messagesent',"Global var CMODE CHASE set to "@%num); }
}
function NMH_Type::send(%chat)
{
parent::send(%chat.getValue());
if(getSubStr(%chat,0,3) $="CAM")
{
%cmd = getSubStr(%chat,4,strlen(%chat))@"("@%chat@")";
eval("AdvancedCamera_"@%cmd);
}
}
};
activatePackage("advcam");

Console when I execute the file:
Quote
==>exec("Add-Ons/Client_AdvancedCamera/client.cs");
Add-Ons/Client_AdvancedCamera/client.cs (16): string always evaluates to 0.
Executing Add-Ons/Client_AdvancedCamera/client.cs.
Add-Ons/Client_AdvancedCamera/client.cs (16): string always evaluates to 0.
Activating package: advcam

2
Modification Help / Tried to fix this stuff, didn't work.
« on: December 16, 2009, 12:53:28 PM »
Well, I'm making some client-sided AdvCam add-on, which until now only can operate chasecam, but will later do much more.
I have a problem about the function which is called if the local client says something, which, as I think, is NMH_Type::chat and takes one parameter which is the message.
With the following script, when I say CAM in-game, nothing happens. Also trying some other commands nothing happens.
Code: [Select]
$ac::silent = 0;
package advcam
{
function NMH_Type::send(%chat)
{
if(getSubStr(%chat,0,3) $="CAM")
{
if(%chat $="CAM")
{
AdvancedCamera_Main();
return;
}
%cmd1 = getSubStr(%chat,4,5);
%cmd2 = strreplace(%cmd1," ","_");
%cmd3 = "AdvancedCamera_"@%cmd@"("@%chat@")";
if(!isFunction(%cmd))
{
if(!$ac::silent) { commandToServer('messagesent',"The CAM command "@%msg1@" does not exist."); }
return;
}
eval(%cmd3);
if(!$ac::silent) { commandToServer('messagesent',"CAM command "@%msg1@" was executed."); }
return;
}
parent::send(%chat);
}
function AdvancedCamera_Main()
{
if(!$ac::silent) { commandToServer('messagesent',"No CAM argument supplied."); }
}
function AdvancedCamera_CMODE_Normal()
{
warn("AdvancedCamera: MODE NORMAL");
localClientConnection.chasecam(0);
}
function AdvancedCamera_CMODE_CHASE(%chat)
{
%num = getSubStr(%chat,16,strlen(%chat));
if(%num <="0") { if(!$ac::silent) { commandToServer('messagesent',"CMODE CHASE Argument out of bounds!"); } }
if(%num <="999") { if(!$ac::silent) { commandToServer('messagesent',"CMODE CHASE Argument out of bounds!"); } }
localClientConnection.chasecam(%num);
if(!$ac::silent) { commandToServer('messagesent',"Global var CMODE CHASE set to "@%num); }
}
};
activatePackage("advcam");

Help would be appreciated.

3
Off Topic / Re: Omegle, funny conversations. Post them here.
« on: December 02, 2009, 08:35:49 AM »
You're now chatting with a random stranger. Say hi!
Stranger: Horny lesbianHorny lesbian
You: Your IP has been logged by FBI because you are a loving horny lesbian idiot.
Stranger: haha
Your conversational partner has disconnected.

 :cookieMonster:

4
Off Topic / Network Provider Userbar
« on: November 30, 2009, 07:51:57 AM »
A service I found, not anything special.




















5
Modification Help / Re: Events/day and night system
« on: November 28, 2009, 10:57:26 AM »
Well, yes - I'm not a event scripting master, but here's some code to get you started.
Code: [Select]
$hoursPerDay = "24";
registerOutputEvent(fxDtsBrick,"setSafe");
function fxDtsBrick::setSafe(%client)
{
          messageClient(%client,'',"\c6You are now safe.");
          %client.isSafe = "1";
}

registerOutputEvent(fxDtsBrick,"setNotSafe");
function fxDtsBrick::setNotSafe(%client)
{
          messageClient(%client,'',"\c6You are now not safe.");
          %client.isSafe = "0";
}

Also, for timing:

...
$dayTime = 1000 * 60 * $hoursPerDay;
schedule($dayTime,toggleDay);

function toggleDay()
{
          if($day $="0")
          {
                    messageAll('',"\c6It is now day!");
                    $day = "1";
          }
          else if($day $="1")
          {
                    messageAll('',"\c6It is now night!");
                    $day = "0";
                    for(%i = 0; i% < clientGroup... stuff here.
          }
}
Remember: I do not guarantee this to work, it is though, just some chunk of code to get you started.

6
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 09:22:40 AM »
Reporting back, all works, thanks Ephialtes, really appreciate your help.
Nearly said that I was going to lock, many people don't like locked help topics.

7
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 09:20:09 AM »
Because it's still scheduled to call "updateAddon" ...

Are you even thinking at all?
Whoops, sorry, that was kinda idiotic, I'll come back soon.

8
Modification Help / Re: NewChat
« on: November 28, 2009, 09:18:35 AM »

9
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 09:14:38 AM »
So, kinda strange, it works, doesn't crash, but it doesn't re-execute it, so there must be something wrong with the schedule.
Source code (Mahro_UpdateAddon/server.cs):
Code: [Select]
function servercmdstartupdating(%client,%addon)
{
exec("Add-Ons/"@%addon@"/server.cs");
messageAll('',"\c3UpdateAddon\c6: Add-On \c5"@%addon@" \c6was executed, reexecuting in 15 seconds.");
schedule(15000,0,"updateAddon",%addon);
}
When typing /startupdating Mahro_IRC it gives me the message, but never executes again.

10
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 09:05:05 AM »
Because upon executing, it tries to update itself which triggers another execution which triggers another update which triggers another execution ... and it gets stuck in a loop.
So, I'd have to do it like, in two diffirent add-ons?

SpeedEdit: I'm going to make Script_UpdateAddon which adds /startupdating Group_Name server command.

11
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 09:01:00 AM »
I don't know why, but when I execute it in-game, I crash.
Complete code (server.cs):
Code: [Select]
//Update
function updateAddon(%addon)
{
exec("Add-Ons/"@%addon@"/server.cs");
messageAll('',"\c3UpdateAddon\c6: Add-On \c5 "@%addon@" \c6was executed, reexecuting in 15 seconds.");
schedule(15000,0,"updateAddon",%addon);
}
updateAddon(Mahro_IRC);

Also, it's some add-on which adds server commands to do IRC-like things in-game. It also modifies the default chat behavior.

12
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 08:55:51 AM »
Doubletoast,

Also, one of my tests, the schedule actually didn't come up with an error, but the delay was kinda 33 milliseconds.

13
Modification Help / Re: Schedule Problem
« on: November 28, 2009, 08:54:04 AM »
You shouldn't use single quotes generally, stick with double quotes. Single quotes are for networked strings.

Secondly, you shouldn't be scheduling a call to eval - and the parameters for that are wrong.
Okay, I've been told you can't call a function but only a package but I'll try:
Code: [Select]
schedule(15000,0,"updateAddon",%addon);

14
Modification Help / Schedule Problem
« on: November 28, 2009, 08:48:22 AM »
So, while making some add-on stuff, I wanted it to update the add-on on the server with a more recent version, and tried making a function called updateAddon taking %addon variable, but encountered some problems with the schedule.

Code: [Select]
function updateAddon(%addon)
{
exec("Add-Ons/"@%addon@"/server.cs");
messageAll('',"\c3UpdateAddon\c6: Add-On\c5 "@%addon@" \c6was executed, reexecuting in 15 seconds.");
schedule(15000,0,'eval','updateAddon',%addon);
}

Help would be appreciated, Tickle.

15
Modification Help / Re: NewChat
« on: November 27, 2009, 01:34:59 PM »
First post reserved for future use.

EDIT:
I'm back, might stay for a while.

Pages: [1] 2 3 4 5 6 ... 10