Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Nioh 3: souls-like punitivo e Action RPG
Nioh 3: souls-like punitivo e Action RPG
Nioh 3 aggiorna la formula Team NINJA con aree esplorabili più grandi, due stili di combattimento intercambiabili al volo (Samurai e Ninja) e un sistema di progressione pieno di attività, basi nemiche e sfide legate al Crogiolo. La recensione entra nel dettaglio su combattimento, build, progressione e requisiti PC
Test in super anteprima di Navimow i220 LiDAR: il robot tagliaerba per tutti
Test in super anteprima di Navimow i220 LiDAR: il robot tagliaerba per tutti
La facilità di installazione e la completa automazione di tutte le fasi di utilizzo, rendono questo prodotto l'ideale per molti clienti. Ecco com'è andata la nostra prova in anteprima
Dark Perk Ergo e Sym provati tra wireless, software via browser e peso ridotto
Dark Perk Ergo e Sym provati tra wireless, software via browser e peso ridotto
be quiet! debutta nel settore mouse da gaming con Dark Perk Ergo e Dark Perk Sym: due modelli gemelli per specifiche, con polling rate di 8.000 Hz anche in wireless, sensore PixArt PAW3950 da 32.000 DPI e autonomia dichiarata fino a 110 ore. Nel test, a 8.000 Hz si arriva a circa 30 ore reali, con ricarica completa in un'ora e mezza
Tutti gli articoli Tutte le news

Vai al Forum
Discussione Chiusa
 
Strumenti
Old 18-02-2008, 23:45   #1
rockdaaga
Junior Member
 
Iscritto dal: Feb 2008
Messaggi: 1
codice msn

salve a tutti, volevo chiedere una cosa: ho questo codice qui sotto che mi crea in msn un bot che parla al posto mio....mettendo una serie di risposte automatiche mi accorgo che c'è un limite nel case...e arrivati sui 1000 e qualcosa caratteri non mi fà più scrivere... come posso allargare a quanto voglio io questo massimo di caratteri?
grazie in anticipo della gentilezza.O comunque sia se non potete aiutarmi grazie mille dell'ascolto e dello spazio concessomi


//Global Vars
var alWnd = null;//Answer List
var hWnd = null;//Help
var aeWnd = null;//Add/Edit
var sWnd = null;//Status
var pWnd = null;//ChatWnd
var ReplyNum = new Array();
var _TYPE = new Array("Fragment","Word","Sentence","RegExp");
var _WHO = new Array("Contact","Self","Both");
var _CASE = 1;
var _GLOBAL = 2;
var _MULTILINE = 4;
var _CONTACT = 8;
var _SELF = 16;
var _FIRST = 32;
var _LAST = 64;
var _WHOLE = 128;
var _RAND = 256;
var _STATUS = new Array("1","2","4","8","16","32","64","128");
var StopAll = 0;
var SW_HIDE = 0;
var SW_SHOW = 5;
var LB_SETSEL = 0x185;
var LB_GETSELCOUNT = 0x190;
var LB_GETSELITEMS = 0x191;
var Enabled = 1;
var tmrIdx = 0;
var GlobalDelay = 0;
var DAnswer = "";
var bullets = 1;
var reg=0;
var caca = 1;

function OnGetScriptMenu(iLocation){
var sMenu = "<ScriptMenu>";
sMenu += "<MenuEntry Id=\"Configure\">Configure Answers</MenuEntry>";
if(Enabled)
sMenu += "<MenuEntry Id=\"EnabledToggle\">Disable Answering</MenuEntry>";
else
sMenu += "<MenuEntry Id=\"EnabledToggle\">Enable Answering</MenuEntry>";
sMenu += "<MenuEntry Id=\"About\">About</MenuEntry>";
sMenu += "</ScriptMenu>";
return sMenu;
}

function BuildWindow() {
if(alWnd == null) {
alWnd = MsgPlus.CreateWnd("Dialog.xml","Configure");
PopulateWindow();
}
}
function PopulateWindow() {
var iCount = alWnd.LstView_GetCount("LsvAnswers");
//Remove old Entries
for(var h = 0; h<iCount; h++)
alWnd.LstView_RemoveItem("LsvAnswers",0);
//Populate ListView with New Entries
for(var j = 0; j<_TYPE.length; j++) {
var aData = GetXMLInfo(_TYPE[j]);
for(var i = 0; i<aData.length; i++) {
var idx = alWnd.LstView_AddItem("LsvAnswers", aData[i][0],j);
alWnd.LstView_SetItemText("LsvAnswers", idx, 1, aData[i][1]);
alWnd.LstView_SetItemText("LsvAnswers", idx, 2, aData[i][2]);
alWnd.LstView_SetItemText("LsvAnswers", idx, 3, aData[i][3]);
alWnd.LstView_SetItemText("LsvAnswers", idx, 4, aData[i][4]);
alWnd.LstView_SetCheckedState("LsvAnswers", idx, aData[i][6]);
}
}
var GDelay = xmlReadDelay();
alWnd.Button_SetCheckState("ChkGlobalDelay",((GDelay[0] === "1") ? true : false));
alWnd.SetControlText("EdtGlobalDelay",GDelay[1]);
}

function BuildEditWindow(iIdx) {
if(!checkXMLExists()) {
PopulateWindow();
return;
}
if(aeWnd != null) return;
aeWnd = MsgPlus.CreateWnd("Dialog.xml","AddEdit");
//Change Title of Window
Interop.Call('user32', 'SetWindowTextW', aeWnd.Handle, "Edit Answer");

//Set Properties
for(var i = 0; i<_TYPE.length; i++)
aeWnd.Combo_AddItem("CmbBoxType",_TYPE[i],i);

for(var i = 0; i<_WHO.length; i++)
aeWnd.Combo_AddItem("CmbBoxWho",_WHO[i],i);

aeWnd.Combo_SetCurSel("CmbBoxType",alWnd.LstView_GetItemData("LsvAnswers",iIdx));
aeWnd.Button_SetCheckState("RdoEdit",true);
aeWnd.SetControlText("EdtOldName",alWnd.LstView_GetItemText("LsvAnswers",iIdx,0));
aeWnd.SetControlText("EdtName",alWnd.LstView_GetItemText("LsvAnswers",iIdx,0));
aeWnd.SetControlText("EdtReceive",alWnd.LstView_GetItemText("LsvAnswers",iIdx,1));
aeWnd.SetControlText("EdtAnswer",alWnd.LstView_GetItemText("LsvAnswers",iIdx,2));
aeWnd.SetControlText("EdtMatchCount",getValue(alWnd.LstView_GetItemText("LsvAnswers",iIdx,0),"MatchCount",1));
aeWnd.SetControlText("EdtStatuses",getValue(alWnd.LstView_GetItemText("LsvAnswers",iIdx,0),"Status",255));
aeWnd.SetcontrolText("EdtDelay",getValue(alWnd.LstView_GetItemText("LsvAnswers",iIdx,0),"Delay",0));

var flags = alWnd.LstView_GetItemText("LsvAnswers",iIdx,4);
if(flags & _CASE) aeWnd.Button_SetCheckState("ChkCase",true);
if(flags & _RAND) aeWnd.Button_SetCheckState("ChkRandomize",true);
if(flags & _GLOBAL) {
aeWnd.Button_SetCheckState("ChkGlobal",true);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('LblMatchCount'), SW_SHOW);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('EdtMatchCount'), SW_SHOW);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('LblMatchCount2'), SW_SHOW);
}
if(flags & _MULTILINE) aeWnd.Button_SetCheckState("ChkMultiline",true);
if(flags & _WHOLE) aeWnd.Button_SetCheckState("ChkWholeMessage",true);
if(flags & _FIRST) aeWnd.Button_SetCheckState("RdoFWord",true);
else if(flags & _LAST) aeWnd.Button_SetCheckState("RdoLWord",true);
else aeWnd.Button_SetCheckState("RdoAnyWord",true);

if((flags & _SELF) && (flags & _CONTACT)) aeWnd.Combo_SetCurSel("CmbBoxWho",2);
else if(flags & _CONTACT) aeWnd.Combo_SetCurSel("CmbBoxWho",0);
else aeWnd.Combo_SetCurSel("CmbBoxWho",1);

//Determine which controls to show
switch(aeWnd.GetControlText("CmbBoxType")) {
case "RegExp":
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoFWord'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoLWord'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoAnyWord'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkWholeMessage'), SW_HIDE);

Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkMultiline'), SW_SHOW);
break;
case "Sentence":
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkMultiline'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoFWord'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoLWord'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoAnyWord'), SW_HIDE);

Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkWholeMessage'), SW_SHOW);
break;
case "Fragment":
case "Word":
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkMultiline'), SW_HIDE);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('ChkWholeMessage'), SW_HIDE);

Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoFWord'), SW_SHOW);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoLWord'), SW_SHOW);
Interop.Call('user32', 'ShowWindow', aeWnd.GetControlHandle('RdoAnyWord'), SW_SHOW);
break;
}

}

//aData[i][0] = Name(String)
//aData[i][1] = Receive(String)
//aData[i][2] = Answer(String)
//aData[i][3] = Type(String)
//aData[i][4] = Flags(Bitwise Integer)
//aData[i][5] = MatchCount(Integer)
//aData[i][6] = Enabled(Integer:0-1)
//aData[i][7] = Status(Bitwise Integer)
//aData[i][8] = Delay(Integer)
function CheckMessage(sOrigin,sMessage,Wnd) {
//Loop through and check each message
for(var j = 0; j<_TYPE.length; j++) {
var aData = GetXMLInfo(_TYPE[j]);
for(var i = 0; i<aData.length; i++) {
//Debug.Trace("Loop: "+j+" Interation: "+i);
if(aData[i][6] === 0) continue;
if(!(aData[i][7] & _STATUS[Messenger.MyStatus-2])) continue;
var sReceive = aData[i][1];
var sAnswer = aData[i][2];
var sName = aData[i][0];
var Type = aData[i][3];
var iFlags = aData[i][4];
var iMatchCount = aData[i][5];
var iDelay = aData[i][8];
var bRandomize = false;
if(iFlags & _RAND) bRandomize = true;
var RegFlags = "";
if(!(iFlags & _SELF))
if(sOrigin === Messenger.MyName)
continue;

if(!(iFlags & _CONTACT))
if(sOrigin !== Messenger.MyName)
continue;

if(iFlags & _GLOBAL) RegFlags += "g";
if(iFlags & _CASE) RegFlags += "i";

var RegEx;
//Create Searches
switch(Type) {
case "Fragment":
if(iFlags & _FIRST) sReceive = "^"+sReceive+".+";
else if(iFlags & _LAST) sReceive = ".+" + sReceive + "$";
RegEx = new RegExp(sReceive,RegFlags);
break;
case "Word":
if(iFlags & _FIRST) sReceive = "^"+sReceive+".+\\b";
else if(iFlags & _LAST) Receive = "\\b.+"+sReceive+"$";
else sReceive = "\\b.+"+sReceive+".+\\b";
RegEx = new RegExp(sReceive,RegFlags);
break;
case "Sentence":
if(iFlags & _WHOLE) sReceive = "^"+sReceive+"$";
RegEx = new RegExp(sReceive,RegFlags);
break;
case "RegExp":
if(iFlags & _MULTILINE) RegFlags += "m";
if(!(iFlags & _GLOBAL)) RegFlags += "g";
RegEx = new RegExp(sReceive,RegFlags);
reg = 1;
break;
}

//Match them
var Matches = sMessage.match(RegEx);
if(Matches != null)
{
if(sMessage.match("^!shoot$"))
{
if(Math.ceil(Math.random()*6)<=bullets)
{
Wnd.SendMessage("BANG ! U DIED ! You had "+((bullets/6)*100)+"% chances to die");
StopAll = 1; //Stop replies for 1 second to reduce likelyhood of spam.
MsgPlus.AddTimer("Stop",1000);
bullets=1;
}
else
{
if(bullets<5)
{
bullets++;
Wnd.SendMessage("*Clic*, You survive and you add a bullet into the gun. (Bullets in gun: "+bullets+")");
}
else
{
Wnd.SendMessage("*Clic*, Congratulation, You survive to russian roulette !");
bullets=1;
}
StopAll = 1; //Stop replies for 1 second to reduce likelyhood of spam.
MsgPlus.AddTimer("Stop",1000);
}
return;
}
if(reg === 1)
{
sAnswer = sMessage.replace(RegEx,sAnswer);
reg = 0;
}
var sOrigin2 = sOrigin;
if( sOrigin2.length > 15)
{
sOrigin2 = sOrigin2.substring(0,15) + "..."
sOrigin2 = sOrigin2.replace("|", "%%temp%%");
}
sAnswer = sAnswer.replace("TELLER",sOrigin2);
if(Matches.length >= iMatchCount || !(iFlags & _GLOBAL))
{
//Randomize! or not.
var Answers = sAnswer.split("|");
if(bRandomize) {
if(Answers.length > 1) sAnswer = Answers[Math.round(Math.random()*(Answers.length-1))];
} else {
if(ReplyNum[i] == null || ReplyNum[i] == undefined) ReplyNum[i] = 0;
if(Answers.length > 1) sAnswer = Answers[ReplyNum[i]++];
if(ReplyNum[i] === Answers.length) ReplyNum[i] = 0;
}

if(!GlobalDelay)
iDelay = Math.abs(Math.round((iDelay>100) ? iDelay : iDelay*1000));
else {
var gDelay = xmlReadDelay();
iDelay = Math.abs(Math.round((gDelay[1]>100) ? gDelay[1] : gDelay[1]*1000));
}
//We don't like 100second+ delays.
if(iDelay > 100000)
iDelay = 100000;
if(iDelay < 0)
iDelay = 0;
if(iDelay === 0) {
sAnswer = sAnswer.replace("%%temp%%", "|");
Wnd.SendMessage(sAnswer);
StopAll = 1; //Stop replies for 1 second to reduce likelyhood of spam.
MsgPlus.AddTimer("Stop",1000);
} else {
sAnswer = sAnswer.replace("%%temp%%", "|");
pWnd = Wnd;
DAnswer = sAnswer;
MsgPlus.AddTimer("Delay",iDelay);
StopAll = 1;
MsgPlus.AddTimer("Stop",iDelay+1000);
}
return;
}
}
}
}
}

Ultima modifica di rockdaaga : 18-02-2008 alle 23:47.
rockdaaga è offline  
Old 19-02-2008, 11:05   #2
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
Thread chiuso
|
V
cionci è offline  
 Discussione Chiusa


Nioh 3: souls-like punitivo e Action RPG Nioh 3: souls-like punitivo e Action RPG
Test in super anteprima di Navimow i220 LiDAR: il robot tagliaerba per tutti Test in super anteprima di Navimow i220 LiDAR: i...
Dark Perk Ergo e Sym provati tra wireless, software via browser e peso ridotto Dark Perk Ergo e Sym provati tra wireless, softw...
DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker DJI RS 5: stabilizzazione e tracking intelligent...
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequen...
Allerta sicurezza per n8n: come protegge...
NIO raggiunge il primo storico profitto ...
Memorie DDR5 cinesi nel tuo prossimo PC?...
Volkswagen e Stellantis chiedono all'UE ...
Final Fantasy VII Remake Parte 3 potrebb...
Lo spettacolo pirotecnico della Xiaomi S...
Black Myth: Wukong potrebbe approdare su...
Aruba e Ducati: la Superbike come labora...
Qualcomm vola nei conti, ma l'industria ...
F1: The Movie, Apple e Formula 1 aprono ...
Amazon Seconda Mano: arriva il 10% extra...
Sysmon diventa nativo su Windows 11: com...
Come aggiornare il PC risparmiando: Amaz...
Amazon testa l'utilizzo dell'AI per film...
BMW i3 Neue Klasse: la berlina elettrica...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 14:13.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v